-
Notifications
You must be signed in to change notification settings - Fork 65
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
Enable mccabe
in ruff
#636
Comments
Interesting. Yes, the |
Yes. Here is the the reference for what |
Thanks for the references, @Shivansh20128 . I think the McCabe complexity measure is a nice one, but similar to test coverage, I suppose I want to be careful that we aren't "chasing the wrong metric". It may very well be the case that some functions will simply have a high McCabe metric, and any refactoring to reduce that would have a net negative impact on the clarity of the code. It might be nice to hook this in as a diagnostic, but I'm not sure if we want to "live and die" by the numbers :). Does that make sense? |
Yes, suree! I just thought that since this issue is open maybe this is something you want to change. |
If I add
C90
to the ruff tools:https://docs.astral.sh/ruff/rules/#mccabe-c90
Adding the errors here to understand what is
too complex
laterThe text was updated successfully, but these errors were encountered: