iterative / shtab

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

Sourcery refactored master branch #76

Closed sourcery-ai[bot] closed 1 year ago

sourcery-ai[bot] commented 2 years ago

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

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

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

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 0.08%.

Quality metrics Before After Change
Complexity 28.94 😞 28.68 😞 -0.26 πŸ‘
Method Length 86.75 πŸ™‚ 88.62 πŸ™‚ 1.87 πŸ‘Ž
Working memory 14.56 😞 14.31 😞 -0.25 πŸ‘
Quality 44.95% 😞 45.03% 😞 0.08% πŸ‘
Other metrics Before After Change
Lines 1360 1427 67
Changed files Quality Before Quality After Quality Change
examples/docopt-greeter.py 85.62% ⭐ 82.58% ⭐ -3.04% πŸ‘Ž
shtab/init.py 29.55% 😞 29.61% 😞 0.06% πŸ‘
shtab/main.py 67.87% πŸ™‚ 67.82% πŸ™‚ -0.05% πŸ‘Ž
tests/test_shtab.py 78.96% ⭐ 78.86% ⭐ -0.10% πŸ‘Ž

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

File Function Complexity Length Working Memory Quality Recommendation
shtab/init.py complete_zsh 61 β›” 756 β›” 27 β›” 3.11% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py get_bash_commands 78 β›” 535 β›” 24 β›” 3.20% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py get_bash_commands.recurse 58 β›” 482 β›” 24 β›” 4.82% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py complete_tcsh 53 β›” 407 β›” 19 β›” 8.68% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py complete_zsh.recurse 17 πŸ™‚ 213 β›” 16 β›” 32.81% 😞 Try splitting into smaller methods. 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

Merging #76 (cf19980) into master (cf19980) will not change coverage. The diff coverage is n/a.

:exclamation: Current head cf19980 differs from pull request most recent head 5eac02b. Consider uploading reports for the commit 5eac02b to get more accurate results

@@           Coverage Diff           @@
##           master      #76   +/-   ##
=======================================
  Coverage   91.04%   91.04%           
=======================================
  Files           3        3           
  Lines         335      335           
=======================================
  Hits          305      305           
  Misses         30       30           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update cf19980...5eac02b. Read the comment docs.