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

Separate Concerns in cli.py Module #62

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

Separate Concerns in cli.py Module #62

thatvideoshopguy opened this issue Mar 24, 2023 · 0 comments

Comments

@thatvideoshopguy
Copy link

thatvideoshopguy commented Mar 24, 2023

Description

The cli.py module currently contains multiple responsibilities, such as configuration handling, argument parsing, and command execution. To improve maintainability and readability, we should divide the cli.py module into smaller, more focused modules, as well as address the issues reported by Code Climate.

Proposed Split

  • args.py: Manages command-line argument parsing and validation.
  • cli.py: Executes WPWatcher commands using the parsed arguments and config file.

Code Climate Recommendations

In addition to splitting the cli.py module, we should also address the following issues reported by Code Climate:

  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.

By addressing these issues and splitting the cli.py module, 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