-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fixes issues with external config files in git repos #219
Conversation
Introduced the `repository_root` field to store the root path of the repository in the data classes. Refactored subprocess handling to use a new `run_command` utility for improved readability and error handling consistency. Removed unnecessary dependency from `.pre-commit-config.yaml` to streamline dependencies.
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.
Version hint: minor Comment ID: Display the version hint-auto-generated |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #219 +/- ##
==========================================
- Coverage 94.07% 93.75% -0.33%
==========================================
Files 25 25
Lines 1570 1617 +47
Branches 311 318 +7
==========================================
+ Hits 1477 1516 +39
- Misses 68 73 +5
- Partials 25 28 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Replaced the bitwise OR operator with the update method for merging dictionaries for 3.8 support
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.
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.