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

Refactor config.py to improve maintainability and readability #64

Open
thatvideoshopguy opened this issue Mar 24, 2023 · 0 comments
Open

Comments

@thatvideoshopguy
Copy link

Description

The config.py module is responsible for handling WPWatcher's configuration. To improve maintainability and readability, we should address the issues reported by Code Climate in the config.py module.

Code Climate Recommendations

  1. Cyclomatic complexity: Break down complex functions into smaller, more focused functions. This will make the code more readable and maintainable.
  2. Cognitive complexity: Simplify the logic in some of the functions by using helper functions or more straightforward control structures.
  3. Maintainability: Refactor the code to improve its maintainability and readability.

Specific Recommendations

  • Refactor the _ini2conf function to reduce its complexity by breaking it into smaller, more focused functions.
  • Simplify the _load_files function by using more straightforward control structures.
  • Refactor the _find_files function to reduce its complexity by breaking it into smaller, more focused functions.

By addressing these issues, we can improve the overall quality and maintainability of the WPWatcher codebase.

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

No branches or pull requests

1 participant