Title: Improve docstrings for `Tool` and `ToolSpec` by Copilot · Pull Request #1582 · usethis-python/usethis-python · GitHub
Open Graph Title: Improve docstrings for `Tool` and `ToolSpec` by Copilot · Pull Request #1582 · usethis-python/usethis-python
X Title: Improve docstrings for `Tool` and `ToolSpec` by Copilot · Pull Request #1582 · usethis-python/usethis-python
Description: The distinction between ToolSpec and Tool was undocumented, leading to confusion about where new methods belong. Changes Class docstrings on ToolSpec and Tool: ToolSpec = factual, non-opinionated, stable specification of a third-party tool. Tool = opinionated, heuristic operations with side-effects (adding/removing config, detecting usage, presenting instructions). Potentially less stable. Module docstrings in spec.py and base.py updated to reflect this framing. rule_config docstring clarified — previously described as "static, opinionated" which was misleading in a ToolSpec context. Now notes the rule choices are opinionated by usethis, but the specification itself is factual metadata. Borderline method annotations: is_config_present() and how_to_use_pre_commit_hook_id() are read-only queries that could arguably live in ToolSpec — added docstring notes explaining why they're placed in Tool (primarily consumed by Tool's mutating operations). Method placement analysis All current methods are appropriately placed. No methods need to move. The two borderline cases (is_config_present, how_to_use_pre_commit_hook_id) are documented with rationale for their current placement in Tool. ⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.
Open Graph Description: The distinction between ToolSpec and Tool was undocumented, leading to confusion about where new methods belong. Changes Class docstrings on ToolSpec and Tool: ToolSpec = factual, non-opinionated,...
X Description: The distinction between ToolSpec and Tool was undocumented, leading to confusion about where new methods belong. Changes Class docstrings on ToolSpec and Tool: ToolSpec = factual, non-opinionated,...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1582
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7aacf8af-c16d-51eb-a0f7-05ee93f79ccf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8EB8:16C0A6:302408:4336C7:6A4D0B88 |
| html-safe-nonce | 1596fc81ff175bfef14760c3ee3f5185b02f5bfabca5e25933a06944ca135f77 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUI4OjE2QzBBNjozMDI0MDg6NDMzNkM3OjZBNEQwQjg4IiwidmlzaXRvcl9pZCI6IjQ0ODMwNzMwNTE2MDQ0NDgwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 86ff78fd3c923a36c96b0e5548464aa82d4c97e9e9b01f31178baa6c741ca6ff |
| hovercard-subject-tag | pull_request:3455109177 |
| 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/1582/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 | The distinction between ToolSpec and Tool was undocumented, leading to confusion about where new methods belong. Changes Class docstrings on ToolSpec and Tool: ToolSpec = factual, non-opinionated,... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width