[REFACTOR] Refactor methods for linting due to cognitive complexity
- Dominant language
- Python
- Stars
- 3
- Forks
- 4
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 11
Description
This issue is created to follow up on: https://github.com/ewcloud/ewccli/pull/108#issue-4428051729
The following methods needs refactoring:
CFQ002, CCR001 -> high cognitive complexity
**hub_backends.py**
- [ ] get_hub_item_env_variable_value
- [ ] run_ansible_item
- [ ] run_ansible_playbook_item
**hub_command.py**
- [ ] categorize_item_inputs
- [ ] validate_item_input_types
- [ ] deploy_cmd
**hub_utils.py**
- [ ] verify_item_is_deployable
**commons_infra.py**
- [ ] check_server_conflict_with_inputs
- [ ] normalize_os_image
- [ ] resolve_image_and_flavor
- [ ] resolve_machine_ip
- [ ] get_deployed_server_info
- [ ] list_server_details
- [ ] pre_deploy_server_setup
- [ ] identify_server_reconfiguration
- [ ] deploy_server
- [ ] post_deploy_server_setup
- [ ] create_server_command
**login_command.py**
- [ ] _resolve_openstack_credentials
Contributor guide
Research direction
Start with the follow-up context in pull request 108, then inspect the listed methods across hub_backends.py, hub_command.py, hub_utils.py, commons_infra.py, and login_command.py. Run the project's lint checks to identify the CFQ002 and CCR001 findings for each method. Done means all listed methods have been refactored so those cognitive-complexity lint findings are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100