Title: Split `usethis._tool.impl` into `spec/` and `base/` submodules by Copilot · Pull Request #1357 · usethis-python/usethis-python · GitHub
Open Graph Title: Split `usethis._tool.impl` into `spec/` and `base/` submodules by Copilot · Pull Request #1357 · usethis-python/usethis-python
X Title: Split `usethis._tool.impl` into `spec/` and `base/` submodules by Copilot · Pull Request #1357 · usethis-python/usethis-python
Description: Each module in usethis._tool.impl contained both a *ToolSpec class (static metadata, deps, pre-commit config) and a *Tool class (runtime behavior). This PR splits them into parallel submodules and removes the original flat modules.
Changes
New impl/spec/ — one file per tool, containing only *ToolSpec subclasses and their supporting constants/helpers (e.g. _RUFF_VERSION, _importlinter_warn_no_packages_found)
New impl/base/ — one file per tool, containing only *Tool subclasses; each imports its *ToolSpec from spec/
Original impl/*.py flat modules removed — all imports across the codebase updated to use the new spec/ or base/ paths directly
.importlinter updated — new contracts for usethis._tool.impl, usethis._tool.impl.spec, and usethis._tool.impl.base reflecting the clean layered architecture (base strictly above spec)
New import paths
# Tool classes (runtime behavior)
from usethis._tool.impl.base.ruff import RuffTool
# ToolSpec classes (static metadata/config)
from usethis._tool.impl.spec.ruff import RuffToolSpec
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Each module in usethis._tool.impl contained both a *ToolSpec class (static metadata, deps, pre-commit config) and a *Tool class (runtime behavior). This PR splits them into parallel submodules and ...
X Description: Each module in usethis._tool.impl contained both a *ToolSpec class (static metadata, deps, pre-commit config) and a *Tool class (runtime behavior). This PR splits them into parallel submodules and ...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1357
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:80d3c98e-00a2-ce9a-6d0f-1650298aac84 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ADD2:3E6EAA:2EEC0DF:40FB14E:6A4F15CE |
| html-safe-nonce | 4b12d70e31bfd20f57791e44b6902f92f9f97602988be299b595a384dad77028 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREQyOjNFNkVBQToyRUVDMERGOjQwRkIxNEU6NkE0RjE1Q0UiLCJ2aXNpdG9yX2lkIjoiMzM5MzYxMjU0OTI0NTU1NzI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a1e425f5bea51cbc5f6f925b7dec4c995ed8fa0a537f65b98448cbb89fe9c8aa |
| hovercard-subject-tag | pull_request:3381341174 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1357/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Each module in usethis._tool.impl contained both a *ToolSpec class (static metadata, deps, pre-commit config) and a *Tool class (runtime behavior). This PR splits them into parallel submodules and ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width