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 1010
1111
1212class 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+
1321 MAJOR = auto ()
1422 MINOR = auto ()
1523 PATCH = auto ()
@@ -80,6 +88,16 @@ def _find_highest_increment(
8088
8189
8290class 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+
83101 def get_increment (
84102 self , commit_message : str , major_version_zero : bool
85103 ) -> SemVerIncrement | None :
You can’t perform that action at this time.
0 commit comments