Use schema namespaces instead of messy lists of imported classes#1267
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors import statements across test and source files to use schema namespace imports instead of importing individual classes directly. The change improves code organization by replacing multiple specific class imports with a single namespace import (e.g., from usethis._integrations.pre_commit import schema), then accessing classes via the namespace (e.g., schema.UriRepo).
Key Changes:
- Consolidates imports by using schema namespaces for pre-commit and Bitbucket configurations
- Replaces individual class imports with namespace-qualified references throughout the codebase
- Updates the fallback UV version from 0.9.20 to 0.9.21
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/usethis/_tool/test_base.py | Replaced individual pre_commit schema class imports with namespace import |
| tests/usethis/_tool/impl/*.py | Updated test files to use schema namespace for pre_commit classes |
| tests/usethis/_integrations/pre_commit/*.py | Refactored to use schema namespace for pre_commit types |
| tests/usethis/_integrations/ci/bitbucket/*.py | Changed to use schema namespace for Bitbucket types |
| src/usethis/_tool/*.py | Updated source files to use schema namespaces |
| src/usethis/_integrations/*.py | Refactored integration modules to use schema namespaces |
| src/usethis/_integrations/backend/uv/version.py | Bumped fallback UV version to 0.9.21 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1267 will not alter performanceComparing Summary
|
No description provided.