iterative / shtab

↔️ Automagic shell tab completion for Python CLI applications
https://docs.iterative.ai/shtab
Other
375 stars 34 forks source link

Fix colons in subcommands (Sourcery refactored) #111

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Pull Request #110 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/iterative/shtab pull/110/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.04%.

Quality metrics Before After Change
Complexity 29.64 😞 28.85 😞 -0.79 👍
Method Length 100.90 🙂 100.51 🙂 -0.39 👍
Working memory 3.58 ⭐ 3.62 ⭐ 0.04 👎
Quality 45.09% 😞 46.13% 😞 1.04% 👍
Other metrics Before After Change
Lines 990 1010 20
Changed files Quality Before Quality After Quality Change
shtab/init.py 25.89% 😞 25.93% 😞 0.04% 👍
tests/test_shtab.py 76.67% ⭐ 76.72% ⭐ 0.05% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
shtab/init.py get_bash_commands 78 ⛔ 590 ⛔ 1.22% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
shtab/init.py complete_zsh 62 ⛔ 903 ⛔ 2.38% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
shtab/init.py complete_tcsh 53 ⛔ 470 ⛔ 4.99% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
tests/test_shtab.py test_add_argument_to_positional 1 ⭐ 171 😞 9 🙂 61.90% 🙂 Try splitting into smaller methods
tests/test_shtab.py test_subparser_aliases 1 ⭐ 172 😞 8 🙂 64.02% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

codecov-commenter commented 2 years ago

Codecov Report

Base: 91.04% // Head: 74.46% // Decreases project coverage by -16.57% :warning:

Coverage data is based on head (a1b2b8d) compared to base (4c0170c). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #111 +/- ## =========================================== - Coverage 91.04% 74.46% -16.58% =========================================== Files 3 2 -1 Lines 335 47 -288 =========================================== - Hits 305 35 -270 + Misses 30 12 -18 ``` | [Impacted Files](https://codecov.io/gh/iterative/shtab/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative) | Coverage Δ | | |---|---|---| | [shtab/\_\_init\_\_.py](https://codecov.io/gh/iterative/shtab/pull/111/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-c2h0YWIvX19pbml0X18ucHk=) | | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.