-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Feature: Clear type info on del for local inferred variables (fixes #10005) #19386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Diff from mypy_primer, showing the effect of this PR on open source code: anyio (https://github.com/agronholm/anyio)
+ src/anyio/abc/__init__.py:58: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ src/anyio/abc/__init__.py:58: : note: use --pdb to drop into pdb
- src/anyio/_backends/_trio.py:192: error: Unused "type: ignore" comment [unused-ignore]
- src/anyio/_backends/_trio.py:357: error: Class cannot subclass "Instrument" (has type "Any") [misc]
- src/anyio/_backends/_trio.py:398: error: Unused "type: ignore" comment [unused-ignore]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
speedrun.com_global_scoreboard_webapp (https://github.com/Avasam/speedrun.com_global_scoreboard_webapp)
+ .../projects/_speedrun.com_global_scoreboard_webapp_venv/lib/python3.13/site-packages/urllib3/connection.py:303: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ .../projects/_speedrun.com_global_scoreboard_webapp_venv/lib/python3.13/site-packages/urllib3/connection.py:303: : note: use --pdb to drop into pdb
- backend/models/global_scoreboard_models.py:20: error: Need type annotation for "variables" (hint: "variables: dict[<type>, <type>] = ...") [var-annotated]
- backend/models/tournament_scheduler_models.py:16: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/tournament_scheduler_models.py:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/tournament_scheduler_models.py:16: error: Invalid base class "BaseModel" [misc]
- backend/models/tournament_scheduler_models.py:20: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:21: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:23: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:23: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:24: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:26: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:27: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:33: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:34: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:39: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:40: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:41: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:44: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:45: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:46: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:47: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:48: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:83: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/tournament_scheduler_models.py:83: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/tournament_scheduler_models.py:83: error: Invalid base class "BaseModel" [misc]
- backend/models/tournament_scheduler_models.py:87: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:88: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:89: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:94: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:95: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:96: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:97: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:120: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/tournament_scheduler_models.py:120: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/tournament_scheduler_models.py:120: error: Invalid base class "BaseModel" [misc]
- backend/models/tournament_scheduler_models.py:124: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:124: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:125: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:126: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:127: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:129: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:130: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:139: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:140: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:141: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:142: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:144: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:198: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/tournament_scheduler_models.py:198: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/tournament_scheduler_models.py:198: error: Invalid base class "BaseModel" [misc]
- backend/models/tournament_scheduler_models.py:202: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:204: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:205: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:214: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:215: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:228: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/tournament_scheduler_models.py:228: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/tournament_scheduler_models.py:228: error: Invalid base class "BaseModel" [misc]
- backend/models/tournament_scheduler_models.py:231: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:233: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:236: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:238: error: Cannot determine type of "db" [has-type]
- backend/models/tournament_scheduler_models.py:243: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/tournament_scheduler_models.py:244: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:24: error: Incompatible types in assignment (expression has type "Model", variable has type "type[Model]") [assignment]
- backend/models/core_models.py:56: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/core_models.py:56: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/core_models.py:56: error: Invalid base class "BaseModel" [misc]
- backend/models/core_models.py:73: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:74: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:75: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:76: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:77: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/core_models.py:78: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/services/user_updater_helpers.py:107: error: Argument 1 to "sorted" has incompatible type "list[__LeaderboardRunData]"; expected "Iterable[dict[str, Any]]" [arg-type]
- backend/services/user_updater_helpers.py:190: error: Incompatible types in assignment (expression has type "list[list[Run]]", variable has type "list[Run]") [assignment]
- backend/services/user_updater_helpers.py:191: error: Argument 1 to "append" of "list" has incompatible type "list[Run]"; expected "Run" [arg-type]
- backend/services/user_updater_helpers.py:192: error: Incompatible types in assignment (expression has type "list[Run]", target has type "list[list[Run]]") [assignment]
- backend/services/user_updater_helpers.py:196: error: Incompatible types in assignment (expression has type "list[list[Run]]", variable has type "list[Run]") [assignment]
- backend/services/user_updater_helpers.py:199: error: Value of type "Run" is not indexable [index]
- backend/services/user_updater_helpers.py:203: error: Argument 2 to "insert" of "list" has incompatible type "list[Run]"; expected "Run" [arg-type]
- backend/services/user_updater_helpers.py:205: error: Argument 1 to "append" of "list" has incompatible type "list[Run]"; expected "Run" [arg-type]
- backend/services/user_updater_helpers.py:225: error: Incompatible types in assignment (expression has type "float", variable has type "int") [assignment]
- backend/models/game_search_models.py:9: error: Variable "models.core_models.BaseModel" is not valid as a type [valid-type]
- backend/models/game_search_models.py:9: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- backend/models/game_search_models.py:9: error: Invalid base class "BaseModel" [misc]
- backend/models/game_search_models.py:24: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:25: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:26: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:27: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:28: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:29: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:30: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/models/game_search_models.py:31: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/api/api_wrappers.py:70: error: Dict entry 0 has incompatible type "str": "dict[str, str]"; expected "str": "str" [dict-item]
- backend/services/user_updater.py:200: error: Argument 2 to "get_paginated_response" has incompatible type "dict[str, object]"; expected "dict[str, str | int]" [arg-type]
- backend/api/tournament_scheduler_api.py:246: error: Need type annotation for "participants" (hint: "participants: list[<type>] = ...") [var-annotated]
- backend/api/tournament_scheduler_api.py:290: error: Need type annotation for "time_slots" (hint: "time_slots: list[<type>] = ...") [var-annotated]
- backend/api/tournament_scheduler_api.py:317: error: Incompatible types in assignment (expression has type "str | int | float | bool | dict[str, Any] | list[Any] | None", variable has type "list[Any]") [assignment]
- backend/api/global_scoreboard_api.py:70: error: "Column" expects no type arguments, but 1 given [type-arg]
- backend/api/global_scoreboard_api.py:104: error: Redundant cast to "str" [redundant-cast]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1249, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2556, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4852, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4859, in visit_if_stmt
+ self.accept(s.else_body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4852, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 862, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1141, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1145, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1180, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1471, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
... (truncated 5 lines) ...
httpx-caching (https://github.com/johtso/httpx-caching)
- httpx_caching/_policy.py:491: error: Incompatible types in assignment (expression has type "None", target has type "int") [assignment]
- httpx_caching/_sync/_cache.py:20: error: Argument 1 to "loads" of "Serializer" has incompatible type "Any | None"; expected "bytes" [arg-type]
- httpx_caching/_async/_cache.py:20: error: Argument 1 to "loads" of "Serializer" has incompatible type "Any | None"; expected "bytes" [arg-type]
- httpx_caching/_wrapper.py:15: error: Incompatible types in assignment (expression has type "AsyncCachingTransport | SyncCachingTransport", variable has type "BaseTransport") [assignment]
- httpx_caching/_wrapper.py:15: error: Incompatible types in assignment (expression has type "AsyncCachingTransport | SyncCachingTransport", variable has type "AsyncBaseTransport") [assignment]
- httpx_caching/_sync/_transport.py:95: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_sync/_transport.py:101: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_sync/_transport.py:106: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_sync/_transport.py:117: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_sync/_transport.py:130: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_async/_transport.py:95: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_async/_transport.py:101: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_async/_transport.py:106: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_async/_transport.py:119: error: Unused "type: ignore" comment [unused-ignore]
- httpx_caching/_async/_transport.py:132: error: Unused "type: ignore" comment [unused-ignore]
- tests/_async/test_expires_heuristics.py:149: error: Unused "type: ignore" comment [unused-ignore]
- tests/_async/test_expires_heuristics.py:173: error: Unused "type: ignore" comment [unused-ignore]
+ .../projects/_httpx-caching_venv/lib/python3.13/site-packages/anyio/abc/__init__.py:55: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ .../projects/_httpx-caching_venv/lib/python3.13/site-packages/anyio/abc/__init__.py:55: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
aiortc (https://github.com/aiortc/aiortc)
+ src/aiortc/rtcrtpreceiver.py:76: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ src/aiortc/rtcrtpreceiver.py:76: : note: use --pdb to drop into pdb
- src/aiortc/rtcpeerconnection.py:1145: error: Untyped decorator makes function "on_datachannel" untyped [misc]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 862, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1141, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1145, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1180, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1471, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4852, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
aiohttp-devtools (https://github.com/aio-libs/aiohttp-devtools)
+ .../projects/_aiohttp-devtools_venv/lib/python3.13/site-packages/anyio/abc/__init__.py:55: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ .../projects/_aiohttp-devtools_venv/lib/python3.13/site-packages/anyio/abc/__init__.py:55: : note: use --pdb to drop into pdb
- tests/test_runserver_cleanup.py:10: error: Untyped decorator makes function "test_server_cleanup_by_url" untyped [misc]
- aiohttp_devtools/runserver/serve.py:33: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp_devtools/runserver/serve.py:47: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp_devtools/runserver/serve.py:50: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp_devtools/runserver/serve.py:57: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp_devtools/runserver/serve.py:60: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp_devtools/runserver/serve.py:91: error: Argument 1 to "append" of "MutableSequence" has incompatible type "Callable[[Request, StreamResponse], Coroutine[Any, Any, None]]"; expected "Callable[[Callable[[Request, StreamResponse], Awaitable[None]]], Awaitable[object]]" [arg-type]
- aiohttp_devtools/runserver/serve.py:271: error: Argument 1 to "append" of "MutableSequence" has incompatible type "Callable[[Application], Coroutine[Any, Any, None]]"; expected "Callable[[Callable[[Application], Awaitable[None]]], Awaitable[object]]" [arg-type]
- aiohttp_devtools/runserver/serve.py:401: error: Unused "type: ignore" comment [unused-ignore]
- tests/test_runserver_serve.py:103: error: Argument 1 to "append" of "MutableSequence" has incompatible type "Callable[[Application], Coroutine[Any, Any, None]]"; expected "Callable[[Callable[[Application], Awaitable[None]]], Awaitable[object]]" [arg-type]
- aiohttp_devtools/runserver/watch.py:120: error: Argument "ssl" to "get" of "ClientSession" has incompatible type "SSLContext | None"; expected "SSLContext | bool | Fingerprint" [arg-type]
- aiohttp_devtools/runserver/watch.py:155: error: Argument "ssl" to "get" of "ClientSession" has incompatible type "SSLContext | None"; expected "SSLContext | bool | Fingerprint" [arg-type]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
- tests/test_runserver_main.py:70: error: Argument 1 has incompatible type "Application"; expected "Callable[[Application], Awaitable[None]]" [arg-type]
- tests/test_runserver_main.py:70: note: "Application.__call__" has type "Callable[[], Application]"
- tests/test_runserver_main.py:88: error: Argument 1 has incompatible type "Application"; expected "Callable[[Application], Awaitable[None]]" [arg-type]
- tests/test_runserver_main.py:88: note: "Application.__call__" has type "Callable[[], Application]"
- tests/test_runserver_main.py:372: error: Argument 1 has incompatible type "Application"; expected "Callable[[Application], Awaitable[None]]" [arg-type]
- tests/test_runserver_main.py:372: note: "Application.__call__" has type "Callable[[], Application]"
- tests/test_runserver_main.py:392: error: Argument 1 has incompatible type "Application"; expected "Callable[[Application], Awaitable[None]]" [arg-type]
- tests/test_runserver_main.py:392: note: "Application.__call__" has type "Callable[[], Application]"
- aiohttp_devtools/cli.py:20: error: Untyped decorator makes function "cli" untyped [misc]
- aiohttp_devtools/cli.py:21: error: Untyped decorator makes function "cli" untyped [misc]
- aiohttp_devtools/cli.py:22: error: Function is untyped after decorator transformation [misc]
- aiohttp_devtools/cli.py:34: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:35: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:36: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:37: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:38: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:39: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:40: error: Untyped decorator makes function "serve" untyped [misc]
- aiohttp_devtools/cli.py:42: error: Function is untyped after decorator transformation [misc]
- aiohttp_devtools/cli.py:74: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:75: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:76: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:77: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:78: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:79: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:81: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:82: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:83: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:84: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:85: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:86: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:87: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:88: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:90: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:92: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:94: error: Untyped decorator makes function "runserver" untyped [misc]
- aiohttp_devtools/cli.py:95: error: Function is untyped after decorator transformation [misc]
sockeye (https://github.com/awslabs/sockeye)
+ sockeye/convert_deepspeed.py:80: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ sockeye/convert_deepspeed.py:80: : note: use --pdb to drop into pdb
- sockeye/beam_search.py:159: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/beam_search.py:264: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- sockeye/beam_search.py:402: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- sockeye/beam_search.py:554: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/beam_search.py:784: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:296: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:414: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1238: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1247: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1296: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1297: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1300: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/inference.py:1317: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/checkpoint_decoder.py:120: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/translate.py:190: error: Incompatible types in assignment (expression has type "tuple[Any, ...]", variable has type "list[str]") [assignment]
- sockeye/training.py:359: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:366: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:386: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:402: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:410: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:660: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:703: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/training.py:771: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/scoring.py:86: error: Unused "type: ignore" comment [unused-ignore]
- sockeye/train.py:1152: error: Unused "type: ignore" comment [unused-ignore]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 862, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1141, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1145, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1180, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1471, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
PyGithub (https://github.com/PyGithub/PyGithub)
- github/GithubObject.py:304: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubObject.py:311: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubObject.py:321: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubObject.py:323: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubObject.py:432: error: Unused "type: ignore" comment [unused-ignore]
- github/Requester.py:1014: error: Unused "type: ignore" comment [unused-ignore]
- github/Requester.py:1015: error: Unused "type: ignore" comment [unused-ignore]
- github/PaginatedList.py:353: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:88: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:120: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:200: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:201: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:202: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:203: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubRetry.py:209: error: Unused "type: ignore" comment [unused-ignore]
- github/WorkflowRun.py:350: error: Unused "type: ignore" comment [unused-ignore]
- github/Stargazer.py:73: error: Unused "type: ignore" comment [unused-ignore]
- github/NamedUser.py:579: error: Unused "type: ignore" comment [unused-ignore]
- github/Repository.py:369: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubIntegration.py:144: error: Unused "type: ignore" comment [unused-ignore]
- github/GithubIntegration.py:152: error: Unused "type: ignore" comment [unused-ignore]
- github/MainClass.py:988: error: Unused "type: ignore" comment [unused-ignore]
- tests/Framework.py:365: error: Unused "type: ignore" comment [unused-ignore]
- tests/Environment.py:31: error: Unused "type: ignore" comment [unused-ignore]
+ .../projects/_PyGithub_venv/lib/python3.13/site-packages/urllib3/connection.py:303: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ .../projects/_PyGithub_venv/lib/python3.13/site-packages/urllib3/connection.py:303: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1249, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2556, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4852, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4859, in visit_if_stmt
+ self.accept(s.else_body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1598, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4852, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 862, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1141, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1145, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1180, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1471, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1330, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 3017, in visit_block
+ self.accept(s)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
setuptools (https://github.com/pypa/setuptools)
+ setuptools/command/__init__.py:21: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ setuptools/command/__init__.py:21: : note: use --pdb to drop into pdb
- setuptools/msvc.py:296: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code [unused-ignore]
- setuptools/msvc.py:1463: error: Unused "type: ignore" comment [unused-ignore]
- pkg_resources/__init__.py:1989: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/monkey.py:76: error: Unused "type: ignore[assignment, misc]" comment [unused-ignore]
- setuptools/monkey.py:85: error: Unused "type: ignore[assignment, misc]" comment [unused-ignore]
- setuptools/monkey.py:86: error: Unused "type: ignore[assignment, misc]" comment [unused-ignore]
- setuptools/extension.py:158: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/dist.py:839: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/__init__.py:117: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/bdist_egg.py:238: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/build_meta.py:91: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/build_meta.py:95: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/install_lib.py:99: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/install_lib.py:100: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/install_lib.py:101: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/build_py.py:53: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/build_py.py:141: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/build_ext.py:249: error: Unused "type: ignore" comment [unused-ignore]
+ Traceback (most recent call last):
+ File "", line 8, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 127, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 211, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 191, in build
+ result = _build(
+ File "/build.py", line 267, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2939, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3337, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3438, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2311, in type_check_first_pass
+ self.type_checker().check_first_pass()
+ File "/checker.py", line 483, in check_first_pass
+ self.accept(d)
+ File "/checker.py", line 590, in accept
+ stmt.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1558, in accept
+ return visitor.visit_del_stmt(self)
+ ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/checker.py", line 5249, in visit_del_stmt
+ and elt.node.is_local
+ ^^^^^^^^^^^^^^^^^
+ AttributeError: 'Var' object has no attribute 'is_local'
aiohttp (https://github.com/aio-libs/aiohttp)
+ .../projects/_aiohttp_venv/lib/python3.13/site-packages/pygments/console.py:35: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.18.0+dev.74851b99b411361fb31baf4cedf93e24339d8c06
+ .../projects/_aiohttp_venv/lib/python3.13/site-packages/pygments/console.py:35: : note: use --pdb to drop into pdb
- aiohttp/compression_utils.py:210:25: error: Argument 1 to "len" has incompatible type "Buffer"; expected "Sized" [arg-type]
- aiohttp/compression_utils.py:251:21: error: Argument 1 to "len" has incompatible type "Buffer"; expected "Sized" [arg-type]
- aiohttp/compression_utils.py:306:9: error: Returning Any from function declared to return "bytes" [no-any-return]
- aiohttp/compression_utils.py:306:9: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-no-any-return for more info
- aiohttp/resolver.py:16: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp/resolver.py:160: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp/resolver.py:165: error: Unused "type: ignore" comment [unused-ignore]
- aiohttp/resolver.py:185:9: error: Type of variable becomes "WeakKeyDictionary[AbstractEventLoop, tuple[Any, WeakSet[AsyncResolver]]]" due to an unfollowed import [no-any-unimported]
... (truncated 9946 lines) ...``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this PR generated by some LLM? The comment I marked with "??" is especially interesting, but the hasattr
check at L5239 also hints at some unreviewed "AI" suggestions applied in bulk. I apologise if it was truly written by yourself, then please revert the unrelated changes and fix the crashes:)
@@ -0,0 +1,278 @@ | |||
"""Classes for producing HTML reports about type checking results.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have anything to do with del
vars?
@@ -0,0 +1,42 @@ | |||
[case testDelVariableResetsType] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only few tests needed for this feature, let's find a relevant existing file and move the tests there instead of adding a new file. check-statements.test
looks like a reasonable place, somewhere in "Del statement" block.
@@ -404,24 +404,38 @@ def has_no_attr( | |||
self.unsupported_left_operand(op, original_type, context) | |||
return codes.OPERATOR | |||
elif member == "__neg__": | |||
display_type = ( | |||
self.pretty_callable_or_overload(original_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it related to del
? Might be a good change, but let's do it separately.
@@ -5306,7 +5321,7 @@ def visit_decorator_inner( | |||
self.fail(message_registry.BAD_CONSTRUCTOR_TYPE, e) | |||
|
|||
if e.func.original_def and isinstance(sig, FunctionLike): | |||
# Function definition overrides function definition. | |||
# Function signature processing continues herection definition overrides function definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
Implements the feature proposed in #10005:
del
is used on a local, inferred variable, the type information is now removed.Details
visit_del_stmt
inchecker.py
to check if the deleted expression is aNameExpr
and a localVar
.type_map
to forget the old type.DeletedType
behavior is preserved for non-local variables.