Title: Returning `Unknown` instead of `Any` for incomplete `__getattr__` · Issue #13765 · python/typeshed · GitHub
Open Graph Title: Returning `Unknown` instead of `Any` for incomplete `__getattr__` · Issue #13765 · python/typeshed
X Title: Returning `Unknown` instead of `Any` for incomplete `__getattr__` · Issue #13765 · python/typeshed
Description: I noticed we have quite a few def __getattr__(name: str) -> Incomplete: ... Wouldn't it be better to write as def __getattr__(name: str): ... # incomplete So that type-checkers like Pyright in strict mode can warn about unknown types ?
Open Graph Description: I noticed we have quite a few def __getattr__(name: str) -> Incomplete: ... Wouldn't it be better to write as def __getattr__(name: str): ... # incomplete So that type-checkers like Pyright in stri...
X Description: I noticed we have quite a few def __getattr__(name: str) -> Incomplete: ... Wouldn't it be better to write as def __getattr__(name: str): ... # incomplete So that type-checkers like Pyright ...
Opengraph URL: https://github.com/python/typeshed/issues/13765
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Returning `Unknown` instead of `Any` for incomplete `__getattr__`","articleBody":"I noticed we have quite a few\n```py\ndef __getattr__(name: str) -> Incomplete: ...\n```\n\nWouldn't it be better to write as \n```py\ndef __getattr__(name: str): ... # incomplete\n```\n\nSo that type-checkers like Pyright in strict mode can warn about unknown types ?","author":{"url":"https://github.com/Avasam","@type":"Person","name":"Avasam"},"datePublished":"2025-04-02T01:32:02Z","url":"https://github.com/python/typeshed/issues/13765"}
| 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:658c3c6f-a525-42e8-d8e0-179ea286ba70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B63E:3E4AC7:90D5AA:C1EAEF:6AFF995D |
| html-safe-nonce | b97c09db8e2638bbbdf4f90598275637cfb39d66b8eac5dd172b55439bb5ae54 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjNFOjNFNEFDNzo5MEQ1QUE6QzFFQUVGOjZBRkY5OTVEIiwidmlzaXRvcl9pZCI6IjE1NjM0NjcyNTk3NDQwNjU4ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4d4ee2a00ef9f6d0d40942712a06cc64220d24e25861ba4b3882d9e5197ff1d9 |
| hovercard-subject-tag | issue:2964905286 |
| 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/13765/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6630933418fdbbd33241ad87d20057b46c71c7793f00c58cf209f06c99336d4d/python/typeshed/issues/13765 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6630933418fdbbd33241ad87d20057b46c71c7793f00c58cf209f06c99336d4d/python/typeshed/issues/13765 |
| og:image:alt | I noticed we have quite a few def __getattr__(name: str) -> Incomplete: ... Wouldn't it be better to write as def __getattr__(name: str): ... # incomplete So that type-checkers like Pyright in stri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Avasam |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2c75d045e8c84b51e2ac680086a6dd1eeaf2bc15b82137d22ee5106835d6256c |
| 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 | 525b66d22c4f7e6bb8b62934bec198964f7e8b93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width