Skip to content

Fix high cyclomatic complexities using Radon#570

Closed
katerinka131 wants to merge 1 commit intoTheKevJames:masterfrom
katerinka131:master
Closed

Fix high cyclomatic complexities using Radon#570
katerinka131 wants to merge 1 commit intoTheKevJames:masterfrom
katerinka131:master

Conversation

@katerinka131
Copy link

I have reduced the cyclomatic complexity in three functions that were marked by Radon as too complex The changes include splitting long functions into smaller ones to improve readability removing redundant conditional statements optimizing logic without changing functionality
This is important because it improves code maintainability and readability simplifies future modifications reduces the risk of errors by minimizing complex branching
Verification was done by rerunning Radon complexity has been reduced

@TheKevJames
Copy link
Owner

Thanks for the contribution, but I think adding a bunch of layers of mini-functions can often make code more annoying to read, not less. In the case of the github and CI environment changes, I don't think the new code is materially easier to understand. The CLI entrypoint is slightly cleaner, though the added layers of method indirection make it a bit less understandable at a glance. I also recently refactored that to use typer, so there's lots of merge conflicts there.

I'm going to close this as unaccepted for now, but you're certainly welcome to open any changes again if you think that a specific piece is easier for humans to grok! I would just request you keep these changes split apart so we can discuss them individually.

Thanks!

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.

2 participants