-
Notifications
You must be signed in to change notification settings - Fork 3
Support PEP 440 #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support PEP 440 #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems lgtm to use pep 440. Let's clean it up a bit and will make a new major release.
| print(release) | ||
| release[-1] += commit_count | ||
| else: | ||
| segments[bump_segment.value] = segments[bump_segment.value] or 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump_segment is a StrEnum, does it need to get value from it?
| release += [0] * (3 - len(release)) | ||
|
|
||
| def get_version(self) -> Version: | ||
| segments = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify please typed dict to avoid using ingore
| if commit_count: | ||
| bump_segment = self.settings.bump_segment | ||
| if bump_segment == VersionSegmentBumpEnum.RELEASE: | ||
| print(release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems redundant
| if self.settings.format == GitVersionFormatEnum.SHORT: | ||
| segments["commit"] = None | ||
|
|
||
| return Version(**segments) # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ignore here?
bump_segmentconfig parameter acceptingrelease(default),dev,post:release: bumpspatch(as in<major>.<minor>.<patch>) or the lowest1 -> 1.0.101.0 -> 1.0.101.0.2 -> 1.0.121.0.0.2 -> 1.0.0.12post: bumpspost1.0 -> 1.0.post101.0.post2 -> 1.0.post12dev: bumpsdev1.0 -> 1.0.dev101.0.dev2 -> 1.0.dev12Backward compatibility is broken in terms of code, however, in terms of plugin interface it is not.