Skip to content

Reduce accepted cyclomatic complexity from 32 to 25 #41

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

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

blowekamp
Copy link
Member

No description provided.

@blowekamp blowekamp requested a review from dave3d July 10, 2023 20:47
pyproject.toml Outdated
@@ -33,4 +33,4 @@ local_scheme = "dirty-tag"
[tool.flake8]
max-line-length = 88
ignore = ['E203', 'W503']
max_complexity = 32
# max_complexity = 32
Copy link
Contributor

@jcfr jcfr Jul 11, 2023

Choose a reason for hiding this comment

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

Suggested change
# max_complexity = 32
max_complexity = 25

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to be explicit.

@jcfr
Copy link
Contributor

jcfr commented Jul 11, 2023

Suggested commit title:

ENH: Reduce accepted cyclomatic complexity from 32 to 10

@jcfr
Copy link
Contributor

jcfr commented Jul 11, 2023

I will revisit the integration of flake8-pyproject and pre-commit, something seems incorrect.

@blowekamp blowekamp force-pushed the update_complexity branch from d05c16c to e75ea79 Compare July 11, 2023 17:49
@blowekamp
Copy link
Member Author

I will revisit the integration of flake8-pyproject and pre-commit, something seems incorrect.

I'm not sure what appears incorrect.

I just set the value to 24, which triggered:

codespell.py:384:1: C901 'main' is too complex (25)

as expected. I will update to 25, and it is expected to pass.

@blowekamp blowekamp changed the title Remove high custom level of complexity in flake8 Reduce accepted cyclomatic complexity from 32 to 25 Jul 11, 2023
@blowekamp blowekamp force-pushed the update_complexity branch from e75ea79 to 43591f5 Compare July 11, 2023 17:53
@dave3d dave3d merged commit fe08737 into SimpleITK:main Jul 11, 2023
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