Title: Move `config_spec` into `ToolSpec` by Copilot · Pull Request #1430 · usethis-python/usethis-python · GitHub
Open Graph Title: Move `config_spec` into `ToolSpec` by Copilot · Pull Request #1430 · usethis-python/usethis-python
X Title: Move `config_spec` into `ToolSpec` by Copilot · Pull Request #1430 · usethis-python/usethis-python
Description: config_spec() lived on Tool, forcing is_likely_used() to take a separate ConfigSpec parameter alongside ToolSpec. Moving it to ToolSpec lets is_likely_used work with just a ToolSpec.
Protocol changes
Added config_spec() to ToolSpec (default: ConfigSpec.empty())
Moved get_active_config_file_managers and _get_active_config_file_managers_from_resolution from Tool to ToolSpec
Removed config_spec() from Tool
Simplified is_likely_used(tool_spec: ToolSpec) — dropped the config_spec parameter, now calls tool_spec.config_spec() internally
# Before
def is_likely_used(tool_spec: ToolSpec, config_spec: ConfigSpec) -> bool: ...
# After
def is_likely_used(tool_spec: ToolSpec) -> bool: ...
All implementations moved from impl/base/ → impl/spec/
All config_spec() implementations now live at the spec layer:
Codespell, Coverage.py, Deptry, MkDocs, Pyproject-fmt, Pytest
Ruff — __init__ (with linter_detection / formatter_detection attrs) and config_spec() moved to RuffToolSpec
Import Linter — config_spec() and helpers (_are_active_ini_contracts, _is_root_package_singular) moved to ImportLinterToolSpec
Original prompt
This section details on the original issue you should resolve
Open Graph Description: config_spec() lived on Tool, forcing is_likely_used() to take a separate ConfigSpec parameter alongside ToolSpec. Moving it to ToolSpec lets is_likely_used work with just a ToolSpec. Protocol chang...
X Description: config_spec() lived on Tool, forcing is_likely_used() to take a separate ConfigSpec parameter alongside ToolSpec. Moving it to ToolSpec lets is_likely_used work with just a ToolSpec. Protocol chang...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1430
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a51a8171-b9a0-c698-208b-fde1322c144a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BD2A:4D576:EC2330:14D7148:6A4CAEF0 |
| html-safe-nonce | 379d8494869b3693f253d468e6c35bbcadecf280bbe8127a41194b5dd9498157 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDJBOjRENTc2OkVDMjMzMDoxNEQ3MTQ4OjZBNENBRUYwIiwidmlzaXRvcl9pZCI6IjM4MjAzOTIxMDMyNzMwODI2MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7fe14da91b62282b792597920af729599b751cb64511e71a17b6eaf8e7bed851 |
| hovercard-subject-tag | pull_request:3423061692 |
| 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/1430/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 | config_spec() lived on Tool, forcing is_likely_used() to take a separate ConfigSpec parameter alongside ToolSpec. Moving it to ToolSpec lets is_likely_used work with just a ToolSpec. Protocol chang... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| 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 | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width