Title: Mypy complains about method decorated with `with_annotated` decorator · Issue #1684 · python-cmd2/cmd2 · GitHub
Open Graph Title: Mypy complains about method decorated with `with_annotated` decorator · Issue #1684 · python-cmd2/cmd2
X Title: Mypy complains about method decorated with `with_annotated` decorator · Issue #1684 · python-cmd2/cmd2
Description: Problem Mypy complains about methods decorated with with_annotated when using strict settings. How to reproduce class App(Cmd): @with_annotated def do_something(...) -> None: # <- Mypy complains here ... Expected behavior Mypy does not c...
Open Graph Description: Problem Mypy complains about methods decorated with with_annotated when using strict settings. How to reproduce class App(Cmd): @with_annotated def do_something(...) -> None: # <- Mypy complains he...
X Description: Problem Mypy complains about methods decorated with with_annotated when using strict settings. How to reproduce class App(Cmd): @with_annotated def do_something(...) -> None: # <- Mypy compla...
Opengraph URL: https://github.com/python-cmd2/cmd2/issues/1684
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy complains about method decorated with `with_annotated` decorator","articleBody":"# Problem\n\nMypy complains about methods decorated with `with_annotated` when using strict settings.\n\n## How to reproduce\n\n```python\nclass App(Cmd):\n\n @with_annotated\n def do_something(...) -\u003e None: # \u003c- Mypy complains here\n ...\n```\n\n## Expected behavior\n\nMypy does not complain.\n\n## Actual behavior\n\nMypy reports:\n\n```\n...: error: Type of decorated function contains type \"Any\" (\"Callable[..., Any]\") [misc]\n def do_something(...)\n```\n\nI think this can be fixed by using `ParamSpec` instead of the ellipsis notation (`Callable[..., Any]`). I have not verified it yet.","author":{"url":"https://github.com/neoniobium","@type":"Person","name":"neoniobium"},"datePublished":"2026-06-10T13:58:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1684/cmd2/issues/1684"}
| 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:c376466c-af47-e8f9-baef-cdd5a7bc73e0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C154:6571C:DEF50:123986:6A4D933C |
| html-safe-nonce | 76dde117975ba1931042c68ba2550842e22dd6df8fd04b191f97dc11c4d6f877 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTU0OjY1NzFDOkRFRjUwOjEyMzk4Njo2QTREOTMzQyIsInZpc2l0b3JfaWQiOiI0NTE2ODc0OTIyMDk0MzM0NzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4fefc82bcc4451af3ae4edbc8cc83e094fee84db8f8dd03144891d089175b8ad |
| hovercard-subject-tag | issue:4631931400 |
| 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/python-cmd2/cmd2/1684/issue_layout |
| twitter:image | https://opengraph.githubassets.com/edbd83ddaed4769944c440fe6d4f4cc8bde5955fb3ecd777080128c180e378b3/python-cmd2/cmd2/issues/1684 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/edbd83ddaed4769944c440fe6d4f4cc8bde5955fb3ecd777080128c180e378b3/python-cmd2/cmd2/issues/1684 |
| og:image:alt | Problem Mypy complains about methods decorated with with_annotated when using strict settings. How to reproduce class App(Cmd): @with_annotated def do_something(...) -> None: # <- Mypy complains he... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | neoniobium |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-cmd2/cmd2 git https://github.com/python-cmd2/cmd2.git |
| octolytics-dimension-user_id | 17161025 |
| octolytics-dimension-user_login | python-cmd2 |
| octolytics-dimension-repository_id | 51442999 |
| octolytics-dimension-repository_nwo | python-cmd2/cmd2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 51442999 |
| octolytics-dimension-repository_network_root_nwo | python-cmd2/cmd2 |
| 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 | 74e2a9c78f1e38588de4f25885878349d721eedf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width