Title: AssertionError: All arguments must be fully typed · Issue #6809 · python/mypy · GitHub
Open Graph Title: AssertionError: All arguments must be fully typed · Issue #6809 · python/mypy
X Title: AssertionError: All arguments must be fully typed · Issue #6809 · python/mypy
Description: Are you reporting a bug, or opening a feature request? bug Please insert below the code you are checking with mypy, or a mock-up repro if the source is private. We would appreciate if you try to simplify your case to a minimal repro. fro...
Open Graph Description: Are you reporting a bug, or opening a feature request? bug Please insert below the code you are checking with mypy, or a mock-up repro if the source is private. We would appreciate if you try to si...
X Description: Are you reporting a bug, or opening a feature request? bug Please insert below the code you are checking with mypy, or a mock-up repro if the source is private. We would appreciate if you try to si...
Opengraph URL: https://github.com/python/mypy/issues/6809
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AssertionError: All arguments must be fully typed","articleBody":"* Are you reporting a bug, or opening a feature request? **bug**\r\n* Please insert below the code you are checking with mypy,\r\n or a mock-up repro if the source is private. We would appreciate\r\n if you try to simplify your case to a minimal repro.\r\n\r\n```\r\nfrom dataclasses import dataclass\r\n\r\n@dataclass(frozen=True)\r\nclass Modifiers:\r\n pass\r\n\r\n@dataclass(frozen=True)\r\nclass Buff:\r\n modifiers: Modifiers\r\n\r\n@dataclass(frozen=True)\r\nclass HB(Buff):\r\n modifiers = Modifiers()\r\n```\r\n\r\n* What is the actual behavior/output?\r\n\r\n```\r\nbug.py:11: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.701\r\nTraceback (most recent call last):\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/bin/mypy\", line 10, in \u003cmodule>\r\n sys.exit(console_entry())\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/__main__.py\", line 7, in console_entry\r\n main(None)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/main.py\", line 84, in main\r\n res = build.build(sources, options, None, flush_errors, fscache)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 163, in build\r\n result = _build(sources, options, alt_lib_path, flush_errors, fscache)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 218, in _build\r\n graph = dispatch(sources, manager)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 2461, in dispatch\r\n process_graph(graph, manager)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 2761, in process_graph\r\n process_stale_scc(graph, scc, manager)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 2862, in process_stale_scc\r\n graph[id].semantic_analysis()\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/build.py\", line 1997, in semantic_analysis\r\n self.manager.semantic_analyzer.visit_file(self.tree, self.xpath, self.options, patches)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 309, in visit_file\r\n self.accept(d)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 3791, in accept\r\n node.accept(self)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/nodes.py\", line 896, in accept\r\n return visitor.visit_class_def(self)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 807, in visit_class_def\r\n self.analyze_class(defn)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 825, in analyze_class\r\n self.analyze_class_body_common(defn)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 833, in analyze_class_body_common\r\n self.apply_class_plugin_hooks(defn)\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/semanal.py\", line 895, in apply_class_plugin_hooks\r\n hook(ClassDefContext(defn, decorator, self))\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/plugins/dataclasses.py\", line 330, in dataclass_class_maker_callback\r\n transformer.transform()\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/plugins/dataclasses.py\", line 100, in transform\r\n return_type=NoneTyp(),\r\n File \"/Users/ezyang/Dev/oss/dl-hmc-calc-env/lib/python3.7/site-packages/mypy/plugins/common.py\", line 97, in add_method\r\n assert arg.type_annotation, 'All arguments must be fully typed.'\r\nAssertionError: All arguments must be fully typed.\r\nbug.py:11: : note: use --pdb to drop into pdb\r\n```\r\n\r\n* What is the behavior/output you expect?\r\n\r\nNo crash\r\n\r\n* What are the versions of mypy and Python you are using?\r\n\r\n```\r\n(/Users/ezyang/Dev/oss/dl-hmc-calc-env) MacBook-Pro-116:dl-hmc-calc ezyang$ python --version\r\nPython 3.7.3\r\n(/Users/ezyang/Dev/oss/dl-hmc-calc-env) MacBook-Pro-116:dl-hmc-calc ezyang$ mypy --version\r\nmypy 0.701\r\n```\r\n\r\n* Do you see the same issue after installing mypy from Git master?\r\n\r\nI didn't try.\r\n\r\n* What are the mypy flags you are using? (For example --strict-optional)\r\n\r\nNone","author":{"url":"https://github.com/ezyang","@type":"Person","name":"ezyang"},"datePublished":"2019-05-09T23:18:38Z","url":"https://github.com/python/mypy/issues/6809"}
| 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:e3b35917-545d-2924-c186-3f4f7e1bc1d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA26:30E5B0:37C4072:4A18D88:6B004C76 |
| html-safe-nonce | 5c5856e6156a6a37d7e04eba24c0862824e187805a99f856b341ee39e2cf1949 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTI2OjMwRTVCMDozN0M0MDcyOjRBMThEODg6NkIwMDRDNzYiLCJ2aXNpdG9yX2lkIjoiNzY2MDgyMjMzNjAzOTMwODQwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cf2f9ba7066f65e722d1d801130abf95eb2e32a9a9f392a98799783603a8bd64 |
| hovercard-subject-tag | issue:442474239 |
| 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/6809/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93e05f549a327f3c19337cfceba94971b290c299538dd2d63bfc921abaa4d41e/python/mypy/issues/6809 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93e05f549a327f3c19337cfceba94971b290c299538dd2d63bfc921abaa4d41e/python/mypy/issues/6809 |
| og:image:alt | Are you reporting a bug, or opening a feature request? bug Please insert below the code you are checking with mypy, or a mock-up repro if the source is private. We would appreciate if you try to si... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ezyang |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width