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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add "flake8-simplify" plugin and simplify code #776

Merged
merged 1 commit into from Sep 1, 2022

Conversation

sisp
Copy link
Member

@sisp sisp commented Sep 1, 2022

I've added the Flake8 plugin flake8-simplify and applied its simplification suggestions.

There's one exception though: SIM117 which suggests merging several with statements that use the same scope. Applying this rule leads to some ugly formatting by Black (psf/black#412, psf/black#664).

I think this Flake8 plugin has identified some nice small improvements and contributes to maintaining a clean code base. Poetry uses it, too. 馃槈

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2022

Codecov Report

Merging #776 (7f8f03b) into master (13fddd9) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #776      +/-   ##
==========================================
- Coverage   96.62%   96.61%   -0.01%     
==========================================
  Files          41       41              
  Lines        2930     2928       -2     
==========================================
- Hits         2831     2829       -2     
  Misses         99       99              
Flag Coverage 螖
unittests 96.61% <80.00%> (-0.01%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
copier/main.py 94.39% <75.00%> (-0.04%) 猬囷笍
copier/vcs.py 97.46% <100.00%> (酶)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Thanks!

@yajo yajo merged commit 84f5644 into copier-org:master Sep 1, 2022
@sisp sisp deleted the refactor/add-flake8-simplify branch September 1, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants