iterative / shtab

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

tcsh: Fix autocompletion for no single-hyphen args (Sourcery refactored) #113

Closed sourcery-ai[bot] closed 1 year ago

sourcery-ai[bot] commented 2 years ago

Pull Request #112 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/112/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 decrease code quality in the affected files by 0.51%.

Quality metrics Before After Change
Complexity 47.11 ⛔ 48.02 ⛔ 0.91 👎
Method Length 136.70 😞 137.60 😞 0.90 👎
Working memory 1.67 ⭐ 1.65 ⭐ -0.02 👍
Quality 25.93% 😞 25.42% 😞 -0.51% 👎
Other metrics Before After Change
Lines 764 771 7
Changed files Quality Before Quality After Quality Change
shtab/init.py 25.93% 😞 25.42% 😞 -0.51% 👎

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 ⛔ 910 ⛔ 2.38% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
shtab/init.py complete_tcsh 57 ⛔ 486 ⛔ 4.02% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
shtab/init.py complete_bash 2 ⭐ 106 🙂 11 😞 64.30% 🙂 Extract out complex expressions
shtab/init.py add_argument_to 4 ⭐ 89 🙂 11 😞 64.67% 🙂 Extract out complex expressions

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: 74.46% // Head: 74.46% // No change to project coverage :thumbsup:

Coverage data is based on head (e1c6903) compared to base (13de419). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #113 +/- ## ======================================= Coverage 74.46% 74.46% ======================================= Files 2 2 Lines 47 47 ======================================= Hits 35 35 Misses 12 12 ``` 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.