Fixes
-
Refactor error handling and improve logging in utils. 890b692
Extracted error formatting to a dedicated function and applied it across the codebase. Improved command path handling in
add_path
and enhanced test coverage with necessary imports and logging configurations. -
Fix dictionary merging in SCMInfo. 5fb5ef2
Replaced the bitwise OR operator with the update method for merging dictionaries for 3.8 support
-
Refactor SCM info retrieval and config file update checks. 500ecd3
Replaced ChainMap with MutableMapping in function signatures and types. Enhanced SCM info handling by splitting code into dedicated methods for commit and revision info retrieval. Added logic to prevent config file updates when the file is outside the repo and implemented corresponding test.
New
-
Add repository_root field and refactor subprocess handling. 25670d0
Introduced the
repository_root
field to store the root path of the repository in the data classes. Refactored subprocess handling to use a newrun_command
utility for improved readability and error handling consistency. Removed unnecessary dependency from.pre-commit-config.yaml
to streamline dependencies.
Other
-
Simplify run_command return type. b91224e
Changed the return type of run_command from CompletedProcess[str] to CompletedProcess. This was done to remove unnecessary type specificity and ensure compatibility with different Python versions. The update maintains functionality and improves code readability.
-
[pre-commit.ci] pre-commit autoupdate. e0ba544
updates: - github.com/astral-sh/ruff-pre-commit: v0.5.2 → v0.5.5