Title: ctypes/__init__.pyi uses TypeVar within ClassVar · Issue #6333 · python/typeshed · GitHub
Open Graph Title: ctypes/__init__.pyi uses TypeVar within ClassVar · Issue #6333 · python/typeshed
X Title: ctypes/__init__.pyi uses TypeVar within ClassVar · Issue #6333 · python/typeshed
Description: I just implemented a check in pyright to report an error if a TypeVar is used within a ClassVar declaration. PEP 526 specifically says: Note that a ClassVar parameter cannot include any type variables, regardless of the level of nesting:...
Open Graph Description: I just implemented a check in pyright to report an error if a TypeVar is used within a ClassVar declaration. PEP 526 specifically says: Note that a ClassVar parameter cannot include any type variab...
X Description: I just implemented a check in pyright to report an error if a TypeVar is used within a ClassVar declaration. PEP 526 specifically says: Note that a ClassVar parameter cannot include any type variab...
Opengraph URL: https://github.com/python/typeshed/issues/6333
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ctypes/__init__.pyi uses TypeVar within ClassVar","articleBody":"I just implemented a check in pyright to report an error if a TypeVar is used within a ClassVar declaration. PEP 526 specifically says:\r\n\r\n>Note that a ClassVar parameter cannot include any type variables, regardless of the level of nesting: ClassVar[T] and ClassVar[List[Set[T]]] are both invalid if T is a type variable.\r\n\r\nA similar [feature request](https://github.com/python/mypy/issues/11538) was recently filed in the mypy issue tracker.\r\n\r\nHere's the issue in the pyright issue tracker: https://github.com/microsoft/pyright/issues/2567.\r\n\r\nThis check is highlighting a problem in the `pointer` class defined within the `ctypes/__init__.pyi` stub.\r\n\r\n```python\r\nclass pointer(Generic[_CT], _PointerLike, _CData):\r\n _type_: ClassVar[Type[_CT]]\r\n```\r\n\r\nI don't know enough about ctypes to suggest a proper fix.","author":{"url":"https://github.com/erictraut","@type":"Person","name":"erictraut"},"datePublished":"2021-11-18T06:36:25Z","url":"https://github.com/python/typeshed/issues/6333"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:5a3e3df1-4c89-50c9-1de4-4dece41a2c2f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9880:2F2EB9:2E0FD88:3D0586B:6B0025FF |
| html-safe-nonce | 6b61c8f123f50716e6473669df6f06fe828566a7f58f698ecd44b7dc976a9a31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODgwOjJGMkVCOToyRTBGRDg4OjNEMDU4NkI6NkIwMDI1RkYiLCJ2aXNpdG9yX2lkIjoiOTM2MjM3MzUyNTk3MDcxMzU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 74610e2495a0530e6f199168cc74d5f91c6f61f26da0ad350b42886be3806d97 |
| hovercard-subject-tag | issue:1056993325 |
| 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/typeshed/6333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a336b1e62142162a1e105d94fb37e23d88b01038ed604852646c25c32ecf523/python/typeshed/issues/6333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a336b1e62142162a1e105d94fb37e23d88b01038ed604852646c25c32ecf523/python/typeshed/issues/6333 |
| og:image:alt | I just implemented a check in pyright to report an error if a TypeVar is used within a ClassVar declaration. PEP 526 specifically says: Note that a ClassVar parameter cannot include any type variab... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erictraut |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width