-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor curl debug functionality into CurlDebugMixin
Extract curl command generation functionality from BaseResource to a dedicated mixin in utils/curl_debug_mixin.py. This improves code organization by: 1. Moving a single-purpose feature into its own module 2. Simplifying the BaseResource class 3. Making the debug functionality more reusable Also updated tests to maintain 100% coverage. Improve type safety with specialized dictionary types Replace generic Optional[Dict[str, Any]] with specialized type aliases throughout the codebase: 1. ParamDict for query string parameters 2. FormDataDict for form data parameters 3. JSONDict for JSON data structures These changes provide better static type checking, improve code readability and maintainability, and fix all mypy type errors related to dictionary types. Add test for curl debug mixin without OAuth Added test case for the fallback path in CurlDebugMixin when OAuth token is not available, ensuring 100% test coverage for the mixin class. Standardize _make_request call formatting - Make endpoint the only positional argument - Use keyword arguments for all other parameters - Adopt consistent multi-line formatting - Maintain 100% test coverage This change improves code readability and maintainability by ensuring a consistent approach to API calls throughout the codebase. Add *,cover files to .gitignore These files are coverage artifacts that should not be tracked in the repo.
- Loading branch information
Showing
17 changed files
with
316 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ coverage.xml | |
htmlcov/ | ||
.pytest_cache/ | ||
.mypy_cache/ | ||
*,cover | ||
|
||
# Mac | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.