Title: Add `usethis-python-enum` agent skill and dict comprehensiveness test by Copilot · Pull Request #1492 · usethis-python/usethis-python · GitHub
Open Graph Title: Add `usethis-python-enum` agent skill and dict comprehensiveness test by Copilot · Pull Request #1492 · usethis-python/usethis-python
X Title: Add `usethis-python-enum` agent skill and dict comprehensiveness test by Copilot · Pull Request #1492 · usethis-python/usethis-python
Description: Type checkers catch missing enum cases in if/elif chains via assert_never, but cannot catch missing keys in enum-keyed dicts. A new agent skill codifies this pattern, and a test is added for the existing _STATUS_TO_CLASSIFIER_MAP.
New skill (.agents/skills/usethis-python-enum/SKILL.md): Documents two enum conventions — assert_never for exhaustive branching, and mandatory unit tests for dicts with enum keys
New test (TestStatusToClassifierMap.test_keys_match_enum): Asserts _STATUS_TO_CLASSIFIER_MAP keys exactly match DevelopmentStatusEnum members
class TestStatusToClassifierMap:
def test_keys_match_enum(self):
assert set(_STATUS_TO_CLASSIFIER_MAP.keys()) == set(DevelopmentStatusEnum)
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Type checkers catch missing enum cases in if/elif chains via assert_never, but cannot catch missing keys in enum-keyed dicts. A new agent skill codifies this pattern, and a test is added for the ex...
X Description: Type checkers catch missing enum cases in if/elif chains via assert_never, but cannot catch missing keys in enum-keyed dicts. A new agent skill codifies this pattern, and a test is added for the ex...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1492
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:cca29a4e-1d95-f5e7-f318-a7172737f6e0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8C32:9D1CD:3B014F:4DDC8B:6A4ED93B |
| html-safe-nonce | 19366688cf86fe7291e28d3388dce02147ec2acb1d8f9fddfc84a7d4671f080d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzMyOjlEMUNEOjNCMDE0Rjo0RERDOEI6NkE0RUQ5M0IiLCJ2aXNpdG9yX2lkIjoiNDE0MDY3MDUyMDM2NTM0MDk4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f81495a844c85adfd391960aa9f2579aa412c20faffc61ec0ce6c31074499a58 |
| hovercard-subject-tag | pull_request:3442271600 |
| 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/1492/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 | Type checkers catch missing enum cases in if/elif chains via assert_never, but cannot catch missing keys in enum-keyed dicts. A new agent skill codifies this pattern, and a test is added for the ex... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| 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 | c37fe3e3f5f306900bd5b6bee97463f66c938b2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width