Title: Explain the `assert_never` pattern better in agent skills · Issue #1598 · usethis-python/usethis-python · GitHub
Open Graph Title: Explain the `assert_never` pattern better in agent skills · Issue #1598 · usethis-python/usethis-python
X Title: Explain the `assert_never` pattern better in agent skills · Issue #1598 · usethis-python/usethis-python
Description: Please restore the old pattern if default: # Register the group - don't do this before adding the deps in case that step fails. if backend is BackendEnum.uv: register_default_group(group) elif backend is BackendEnum.none: # This is not r...
Open Graph Description: Please restore the old pattern if default: # Register the group - don't do this before adding the deps in case that step fails. if backend is BackendEnum.uv: register_default_group(group) elif back...
X Description: Please restore the old pattern if default: # Register the group - don't do this before adding the deps in case that step fails. if backend is BackendEnum.uv: register_default_group(group) elif ...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1598
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Explain the `assert_never` pattern better in agent skills","articleBody":"\u003e Please restore the old pattern\n\u003e \n\u003e ```\n\u003e if default:\n\u003e # Register the group - don't do this before adding the deps in case that step fails.\n\u003e if backend is BackendEnum.uv:\n\u003e register_default_group(group)\n\u003e elif backend is BackendEnum.none:\n\u003e # This is not really a meaningful concept without a package manager\n\u003e pass\n\u003e else:\n\u003e assert_never(backend)\n\u003e ```\n\u003e \n\u003e The rationale being that this makes it safer in case we add a new backend, that we don't silently fail to add support for it here. \n\n _Originally posted by @nathanjmcdougall in [#1589](https://github.com/usethis-python/usethis-python/pull/1589/changes#r3000160894)_\n\nWe should explain not to remove this pattern when it is encountered, give examples of good and bad; and explain why it's positively helpful for enums in general.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-03-27T10:22:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1598/usethis-python/issues/1598"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:85074fe2-47f9-f482-9c20-2f3980dbe1e2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC04:18EF1B:34ABDD9:48341C3:6A4F2C77 |
| html-safe-nonce | 0c1d48be1979043e8a9a300f317e8c32c9b625d081fd550fb1137c07a04da0e3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzA0OjE4RUYxQjozNEFCREQ5OjQ4MzQxQzM6NkE0RjJDNzciLCJ2aXNpdG9yX2lkIjoiMjAzOTU4MDE5ODU2MzY4NzU0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d500dab4d132d40e1202672fcfcff6dd6c14442daa021ad3894ceeb395791049 |
| hovercard-subject-tag | issue:4151338539 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/usethis-python/usethis-python/1598/issue_layout |
| twitter:image | https://opengraph.githubassets.com/652d1b09438c6da714dba92133f37b02a3fa949df73bad4a54540bd81473c9bd/usethis-python/usethis-python/issues/1598 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/652d1b09438c6da714dba92133f37b02a3fa949df73bad4a54540bd81473c9bd/usethis-python/usethis-python/issues/1598 |
| og:image:alt | Please restore the old pattern if default: # Register the group - don't do this before adding the deps in case that step fails. if backend is BackendEnum.uv: register_default_group(group) elif back... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width