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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: add 'complexity' lint group to ruff config #1523

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

danieleades
Copy link
Contributor

adds the 'complexity' lint group to the ruff config.

I believe this brings the ruff config inline with the flake8 config, and therefore makes the flake8 linting redundant.

for reference, the flake8 config is:

[flake8]
ignore = E203, E501, W503, B950
max-line-length = 88
select = C,E,F,W,B
per-file-ignores=
    __init__.py:F401

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.27%. Comparing base (fa63677) to head (c6e5f6c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1523      +/-   ##
==========================================
- Coverage   97.34%   97.27%   -0.07%     
==========================================
  Files          48       48              
  Lines        4557     4557              
==========================================
- Hits         4436     4433       -3     
- Misses        121      124       +3     
Flag Coverage Δ
unittests 97.27% <100.00%> (-0.07%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danieleades
Copy link
Contributor Author

I'm a little surprised to see the behaviour differs. Maybe I'm missing something

@yajo
Copy link
Member

yajo commented Feb 22, 2024

It says we have a couple of overly complex functions. However both seem ok to me. could you please configure ruff to allow them, or add exclusion comments?

@danieleades
Copy link
Contributor Author

It says we have a couple of overly complex functions. However both seem ok to me. could you please configure ruff to allow them, or add exclusion comments?

can do.
To be fair, I agree with Ruff's assessment that these functions are overly-complex and in need of a refactor. But i find it surprising that it appears to calculate the complexity differently to flake8

Copy link
Member

@sisp sisp left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉 Thanks, @danieleades! 🙏

@sisp sisp merged commit 9715d0e into copier-org:master Feb 23, 2024
20 of 21 checks passed
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.

3 participants