iterative / shtab

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

Fix typos (Sourcery refactored) #102

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Pull Request #101 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/101/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 leaves code quality unchanged.

Quality metrics Before After Change
Complexity 42.39 ⛔ 42.39 ⛔ 0.00
Method Length 132.61 😞 132.74 😞 0.13 👎
Working memory 2.16 ⭐ 2.16 ⭐ 0.00
Quality 30.69% 😞 30.69% 😞 0.00%
Other metrics Before After Change
Lines 815 819 4
Changed files Quality Before Quality After Quality Change
shtab/init.py 25.89% 😞 25.88% 😞 -0.01% 👎
shtab/main.py 70.21% 🙂 70.17% 🙂 -0.04% 👎

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 ⛔ 901 ⛔ 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
shtab/main.py main 8 ⭐ 148 😞 7 🙂 61.90% 🙂 Try splitting into smaller methods
shtab/init.py complete_bash 2 ⭐ 106 🙂 11 😞 64.30% 🙂 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!