Skip to content

Improve pysemver subcommands #214

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

Merged
merged 1 commit into from
Jan 19, 2020

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Dec 10, 2019

This PR is not based on a specific issue, but is a refactoring effort to improve maintenance of the pysemver subcommands:

  • Use separate cmd_* functions for each subcommand (basically, I've moved the if...elif clauses from process into separate functions).
  • Replace which with func keyword.
  • Use func keyword to store the specific cmd_* function.
  • Adapt tests.
  • (Re)format with black.
  • Clarify how to interpret return code in manpage (add new section "Return Code").

=> Easier to extend subcommands

@tomschr tomschr added the Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness label Dec 10, 2019
@tomschr tomschr requested a review from a team December 10, 2019 13:24
@tomschr tomschr self-assigned this Dec 10, 2019
* Use separate cmd_* functions for each subcommand
* Replace which with func keyword
* Use func keyword to store the specific cmd_* function
* Adapt tests
* (Re)format with black
* Clarify return code in manpage (add new section "Return Code")

=> Easier to extend
@tomschr tomschr force-pushed the feature/refactor-pysemver branch from 9355ea7 to d5f55b6 Compare December 10, 2019 16:02
@tomschr
Copy link
Member Author

tomschr commented Jan 18, 2020

@python-semver/reviewers any comments? 😉

@s-celles s-celles merged commit 5755f9a into python-semver:master Jan 19, 2020
@tomschr tomschr deleted the feature/refactor-pysemver branch January 19, 2020 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy