Title: Add YAGNI for function parameters to usethis-python-functions skill by Copilot · Pull Request #1622 · usethis-python/usethis-python · GitHub
Open Graph Title: Add YAGNI for function parameters to usethis-python-functions skill by Copilot · Pull Request #1622 · usethis-python/usethis-python
X Title: Add YAGNI for function parameters to usethis-python-functions skill by Copilot · Pull Request #1622 · usethis-python/usethis-python
Description: A previous PR introduced PreCommitConfig.from_system_hook() with parameters (always_run, pass_filenames, require_serial) that were always called with the same value — a YAGNI violation. The parameters were removed in that PR; this captures the principle as a reusable agent skill. Changes usethis-python-functions skill (v1.0 → v1.1): adds a "YAGNI: don't add function parameters you don't need yet" section covering: Only introduce a parameter when at least two distinct values are actually used at call sites Applies especially to helper/internal functions Diagnostic signs, corrective steps, and a concrete before/after example drawn from the from_system_hook case: # Bad: always_run is always True, pass_filenames is always False def make_hook(hook_id: str, entry: str, *, always_run: bool, pass_filenames: bool) -> Hook: ... # Good: hardcode values that never change def make_hook(hook_id: str, entry: str) -> Hook: always_run = True pass_filenames = False ... 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
Open Graph Description: A previous PR introduced PreCommitConfig.from_system_hook() with parameters (always_run, pass_filenames, require_serial) that were always called with the same value — a YAGNI violation. The paramet...
X Description: A previous PR introduced PreCommitConfig.from_system_hook() with parameters (always_run, pass_filenames, require_serial) that were always called with the same value — a YAGNI violation. The paramet...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1622
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e9ea36d3-dcf4-482a-1e0a-c22b49f3bbdf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ACFE:11DE2:218ACA:2DCB52:6A4D32AE |
| html-safe-nonce | 1ca23031641dd6a2cedfea4865571e222db1a65f4a0595cc8afe3d7f0dc39040 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0ZFOjExREUyOjIxOEFDQToyRENCNTI6NkE0RDMyQUUiLCJ2aXNpdG9yX2lkIjoiODUyMjExODA2OTQ5NjkxODcwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 58a5be6908b66f5ac241b3c882f5602866d84eabc8bf1ff579e844dda38d1257 |
| hovercard-subject-tag | pull_request:3461525663 |
| 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/1622/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 | A previous PR introduced PreCommitConfig.from_system_hook() with parameters (always_run, pass_filenames, require_serial) that were always called with the same value — a YAGNI violation. The paramet... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width