Skip to content

Remove-code-smell-too-many-branches#2095

Open
paulo9631 wants to merge 1 commit into
mindee:mainfrom
thamitaboza:refactor/remove-code-smell-too-many-branches
Open

Remove-code-smell-too-many-branches#2095
paulo9631 wants to merge 1 commit into
mindee:mainfrom
thamitaboza:refactor/remove-code-smell-too-many-branches

Conversation

@paulo9631

Copy link
Copy Markdown

Description:
This PR addresses multiple Pylint too-many-branches (R0912) warnings across the project to improve code readability and maintainability.

Changes made:

Refactored complex methods with deeply nested conditionals and loops by extracting logic into smaller, dedicated private helper methods.

Updated multiple files across datasets, models, and utils modules (including COCOTEXT, CORD, LWDETR, KIEPredictor, metrics, and visualizations).

Successfully reduced the branch count of all flagged methods to well below the Pylint limit of 12.

Impact:
All original logic, semantics, and system behavior are strictly preserved. The codebase is now cleaner, easier to maintain, and fully passes the Pylint checks for branch complexity.

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.

1 participant