chore: fixed code smells #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This pull request focuses on improving type safety and robustness across the codebase by updating type annotations, handling potential None values, and making minor refactors for clarity. The changes primarily affect the handling of optional values, type hints, and error handling, especially in service, controller, and utility modules.
Type annotation improvements and None handling:
[dict]) to modern Python type hints (e.g.,list[dict],dict | list), improving code clarity and type checking. [1] [2] [3] [4] [5] [6] [7] [8] [9]Service and API client updates:
SwitcherClientand related service methods to use the correct certificate path variable and improved the verification logic for HTTP requests. [1] [2]Controller and view logic refactoring:
Testing improvements:
These changes collectively enhance code maintainability, reduce the likelihood of type-related bugs, and improve developer experience with clearer type expectations.