-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support PEP 440 #15
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?
|
||
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_segment
config parameter acceptingrelease
(default),dev
,post
:release
: bumpspatch
(as in<major>.<minor>.<patch>
) or the lowest1 -> 1.0.10
1.0 -> 1.0.10
1.0.2 -> 1.0.12
1.0.0.2 -> 1.0.0.12
post
: bumpspost
1.0 -> 1.0.post10
1.0.post2 -> 1.0.post12
dev
: bumpsdev
1.0 -> 1.0.dev10
1.0.dev2 -> 1.0.dev12
Backward compatibility is broken in terms of code, however, in terms of plugin interface it is not.