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

feat: add --version cli switch #468

Merged
merged 1 commit into from
Mar 19, 2022
Merged

Conversation

mjpieters
Copy link
Contributor

Fix these issue(s): #463

Proposed changes

Uses the @cli.version_option() utility decorator to add a --version cli
switch:

$ nitpick --version
nitpick, version 0.31.0

I didn't add a test for this as it is a single line change; the click project
has this covered nicely already.

Checklist

  • Read the contribution guidelines
  • Run make locally before pushing commits
  • Add tests for the relevant parts:
    • API
    • CLI
    • flake8 plugin (normal mode)
    • flake8 plugin (offline mode)
  • Write documentation when there's a new API or functionality

@coveralls
Copy link

coveralls commented Mar 19, 2022

Pull Request Test Coverage Report for Build 2009391717

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 97.039%

Totals Coverage Status
Change from base Build 2009200845: 0.001%
Covered Lines: 2065
Relevant Lines: 2111

💛 - Coveralls

Copy link
Owner

@andreoliwa andreoliwa left a comment

Choose a reason for hiding this comment

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

🚀 Thanks for this, I didn't know it needed a single line change.

I didn't add a test for this as it is a single line change; the click project
has this covered nicely already.

Agreed. 👍🏻

@andreoliwa andreoliwa merged commit 6a85f79 into andreoliwa:develop Mar 19, 2022
@mjpieters mjpieters deleted the cli_version branch March 19, 2022 18:26
github-actions bot pushed a commit that referenced this pull request Mar 27, 2022
# [0.32.0](v0.31.0...v0.32.0) (2022-03-27)

### Bug Fixes

* **deps:** update dependency pytest-socket to a commit hash ([#440](#440)) ([61ac278](61ac278))
* GitHub URL should preserve query args ([#453](#453)) ([a2b97b1](a2b97b1))
* use built-in preset as default style ([#450](#450)) ([68fa2ce](68fa2ce))

### Features

* add --version cli switch (thanks to [@mjpieters](https://github.com/mjpieters)) ([#468](#468)) ([6a85f79](6a85f79))
* resolve relative URIs in nitpick.styles.include ([#470](#470)) ([ec934dc](ec934dc))
* set initial style url(s) with nitpick init ([#473](#473)) ([0100f2b](0100f2b))
* switch to requests-cache for style caching ([#467](#467)) ([c586d7f](c586d7f))
@github-actions
Copy link

🎉 This PR is included in version 0.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Feature/fix is released label Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Feature/fix is released
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants