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

Flake8 rule C901 is about McCabe code complexity #3673

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Apr 4, 2024

Flake8 C901 is not about flake8-comprehensions which are C4xx rules.

This misconfiguration has made us blind to increasing code complexity... https://pypi.org/project/mccabe

- max-complexity = 15
+ max-complexity = 29

Related to:

Overview: What does this pull request change?

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages

Further Information and Comments

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@cclauss cclauss marked this pull request as ready for review April 4, 2024 10:37
Copy link
Contributor

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

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

Nice catch, just one question.

@@ -2,7 +2,7 @@
# Exclude the grpc generated code
exclude = ./manim/grpc/gen/*, __pycache__,.git,
per-file-ignores = __init__.py:F401
max-complexity = 15
max-complexity = 29
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 29?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@behackl behackl left a comment

Choose a reason for hiding this comment

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

Thanks!

@behackl behackl merged commit 1aad0c7 into ManimCommunity:main Apr 9, 2024
14 of 18 checks passed
@cclauss cclauss deleted the patch-1 branch April 9, 2024 06:24
JasonGrace2282 pushed a commit to JasonGrace2282/manim that referenced this pull request Apr 20, 2024
* Flake8 rule C901 is about McCabe code complexity

It is not about flake8-comprehensions.

* max-complexity = 29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants