File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
12
12
class SemVerIncrement (Enum ):
13
+ """An enumeration representing semantic versioning increments.
14
+
15
+ This class defines the three types of version increments according to semantic versioning:
16
+ - MAJOR: For incompatible API changes
17
+ - MINOR: For backwards-compatible functionality additions
18
+ - PATCH: For backwards-compatible bug fixes
19
+ """
20
+
13
21
MAJOR = auto ()
14
22
MINOR = auto ()
15
23
PATCH = auto ()
@@ -80,6 +88,16 @@ def _find_highest_increment(
80
88
81
89
82
90
class BumpRule (Protocol ):
91
+ """A protocol defining the interface for version bump rules.
92
+
93
+ This protocol specifies the contract that all version bump rule implementations must follow.
94
+ It defines how commit messages should be analyzed to determine the appropriate semantic
95
+ version increment.
96
+
97
+ The protocol is used to ensure consistent behavior across different bump rule implementations,
98
+ such as conventional commits or custom rules.
99
+ """
100
+
83
101
def get_increment (
84
102
self , commit_message : str , major_version_zero : bool
85
103
) -> SemVerIncrement | None :
You can’t perform that action at this time.
0 commit comments