Title: No warning for instantiating abstract class in function · Issue #9207 · python/mypy · GitHub
Open Graph Title: No warning for instantiating abstract class in function · Issue #9207 · python/mypy
X Title: No warning for instantiating abstract class in function · Issue #9207 · python/mypy
Description: Are you reporting a bug, or opening a feature request? BUG Please insert below the code you are checking with mypy, import abc class A(abc.ABC): @abc.abstractmethod def f(self): pass # Cannot instantiate abstract class 'A' with abstract ...
Open Graph Description: Are you reporting a bug, or opening a feature request? BUG Please insert below the code you are checking with mypy, import abc class A(abc.ABC): @abc.abstractmethod def f(self): pass # Cannot insta...
X Description: Are you reporting a bug, or opening a feature request? BUG Please insert below the code you are checking with mypy, import abc class A(abc.ABC): @abc.abstractmethod def f(self): pass # Cannot insta...
Opengraph URL: https://github.com/python/mypy/issues/9207
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No warning for instantiating abstract class in function","articleBody":"* Are you reporting a bug, or opening a feature request? \r\n\r\n**BUG**\r\n\r\n* Please insert below the code you are checking with mypy,\r\n\r\n```python\r\nimport abc\r\n\r\nclass A(abc.ABC):\r\n @abc.abstractmethod\r\n def f(self): pass\r\n\r\n# Cannot instantiate abstract class 'A' with abstract attribute 'f'\r\na = A()\r\n\r\n# Cannot instantiate abstract class 'A' with abstract attribute 'f'\r\nal = lambda: A()\r\n\r\n# No warnings\r\ndef af():\r\n return A()\r\n```\r\n\r\nhttps://mypy-play.net/?mypy=latest&python=3.8&gist=fbc0513ec90bda028634ade70ff698e2\r\n\r\n* What is the actual behavior/output? \r\n\r\n**See comments above.**\r\n\r\n* What is the behavior/output you expect? \r\n\r\n**I expect the \"Cannot instantiate abstract class [...]\" warning in all three cases.**","author":{"url":"https://github.com/Holt59","@type":"Person","name":"Holt59"},"datePublished":"2020-07-25T14:46:45Z","url":"https://github.com/python/mypy/issues/9207"}
| 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:2d1d474f-ab21-ee8e-1720-e2d04bf16268 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 955E:3204C8:293B460:35F8104:6B000A61 |
| html-safe-nonce | 7acb117d5714b922b2f5a368df7462ee3d6e1f46a454451d3c781bd1196f6852 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTVFOjMyMDRDODoyOTNCNDYwOjM1RjgxMDQ6NkIwMDBBNjEiLCJ2aXNpdG9yX2lkIjoiNDg0NTQwNDkyMDU2MTUzNTU4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 906716c37c5d1771412a43a3a1f025fcbc0da772a94a0e95c20de4ce5e3d57a1 |
| hovercard-subject-tag | issue:665597469 |
| 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/mypy/9207/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c8c4388732cd82daeca325f6ee867ea8b8a0e66bb121c71167bd426f1828989/python/mypy/issues/9207 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c8c4388732cd82daeca325f6ee867ea8b8a0e66bb121c71167bd426f1828989/python/mypy/issues/9207 |
| og:image:alt | Are you reporting a bug, or opening a feature request? BUG Please insert below the code you are checking with mypy, import abc class A(abc.ABC): @abc.abstractmethod def f(self): pass # Cannot insta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Holt59 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width