Skip to content
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

Extract code from cli.main into shorter methods #68

Merged
merged 60 commits into from Aug 24, 2019

Conversation

florisla
Copy link
Collaborator

This does not change any functionality, but it makes main() much shorter and at least
helps to decode what's going on.

Done as a preparation for implementing #57, which has impact on argument parsing.

I've made sure that cli.py satisfies pylint similar to what's done in #67.
Merging this with #67 would give merge conflicts, but this way it does not require manual resolution.

@clbarnes
Copy link
Contributor

clbarnes commented Jun 6, 2019

I'd love to see this go in, the current main function is unnecessarily hard to get to grips with, which is holding up progress on other issues.

@florisla
Copy link
Collaborator Author

florisla commented Jun 7, 2019

It's definitely an improvement, although I've found that doing heavy modification of the command-line arguments is still... quite painful :-)

Maintainers, can this be considered for merging? Anything that needs to be done differently?

Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks like a nice improvement.

bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
@florisla
Copy link
Collaborator Author

This is now rebased on master + I have applied all the suggestions.
Thrown in the fix from #73 to pass AppVeyor.
I'll look at the Travis failure soon.

This got lost in the recent rebase.
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
@florisla
Copy link
Collaborator Author

With this update, the branch conforms to all remarks.

@c4urself c4urself merged commit eefd886 into c4urself:master Aug 24, 2019
@florisla florisla deleted the shorter-main branch September 7, 2019 13:11
@florisla florisla added this to the v1.0.0 milestone Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants