-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Get empty dict issue #18273
Open
huandy4
wants to merge
2
commits into
python:master
Choose a base branch
from
huandy4:get_empty_dict_error_#17684
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Get empty dict issue #18273
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for more information, see https://pre-commit.ci
Diff from mypy_primer, showing the effect of this PR on open source code: operator (https://github.com/canonical/operator)
+ ops/charm.py:1598: 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.14.0+dev.358c0a7c7a0540de6ff8449753762956b6fc67dd
+ ops/charm.py:1598: : note: use --pdb to drop into pdb
+ ops/charm.py:1578: error: Need type annotation for "websites" [var-annotated]
+ ops/charm.py:1584: error: Need type annotation for "sources" [var-annotated]
+ ops/charm.py:1590: error: Need type annotation for "issues" [var-annotated]
- ops/model.py:450: error: Incompatible types in assignment (expression has type "StatusBase", variable has type "None") [assignment]
- ops/model.py:624: error: Incompatible types in assignment (expression has type "StatusBase", variable has type "None") [assignment]
- ops/model.py:3324: error: Unused "type: ignore" comment [unused-ignore]
- ops/model.py:3327: error: Unused "type: ignore" comment [unused-ignore]
- ops/model.py:3329: error: Unused "type: ignore" comment [unused-ignore]
- ops/model.py:3331: error: Unused "type: ignore" comment [unused-ignore]
+ ops/model.py:3662: error: Need type annotation for "units" [var-annotated]
+ 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 109, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 193, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 194, in build
+ result = _build(
+ File "/build.py", line 269, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2940, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3338, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3439, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2309, 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 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1196, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2462, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 827, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1046, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1050, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1084, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1360, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1545, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4735, in visit_if_stmt
+ self.accept(b)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1364, in accept
+ return visitor.visit_assignment_stmt(self)
+ File "/checker.py", line 3001, in visit_assignment_stmt
+ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None, s.new_syntax)
+ File "/checker.py", line 3179, in check_assignment
+ rvalue_type = self.check_simple_assignment(lvalue_type, rvalue, context=rvalue)
+ File "/checker.py", line 4347, in check_simple_assignment
+ rvalue_type = self.expr_checker.accept(
+ File "/checkexpr.py", line 5926, in accept
+ typ = node.accept(self)
+ ^^^^^^^^^^^^^^^^^
+ File "/nodes.py", line 1984, in accept
+ return visitor.visit_call_expr(self)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 508, in visit_call_expr
+ return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 642, in visit_call_expr_inner
+ ret_type = self.check_call_expr_with_callee_type(
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 1498, in check_call_expr_with_callee_type
+ return self.check_union_call_expr(e, object_type, member)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 1526, in check_union_call_expr
+ item = analyze_member_access(
+ ^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkmember.py", line 210, in analyze_member_access
+ return analyze_dict_get(typ, context)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ TypeError: analyze_dict_get() missing 1 required positional argument: 'context'
- ops/framework.py:170: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:582: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:618: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1230: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1232: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1234: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1289: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1368: error: Unused "type: ignore" comment [unused-ignore]
- ops/framework.py:1443: error: Unused "type: ignore" comment [unused-ignore]
- ops/charm.py:1323: error: Unused "type: ignore" comment [unused-ignore]
- ops/charm.py:1618: error: Need type annotation for "raw_actions" (hint: "raw_actions: dict[<type>, <type>] = ...") [var-annotated]
- ops/charm.py:1620: error: Incompatible types in assignment (expression has type "dict[str, Any] | None", variable has type "dict[Any, Any]") [assignment]
- ops/charm.py:1754: error: Incompatible types in assignment (expression has type "list[str]", variable has type "str") [assignment]
- ops/charm.py:1756: error: Incompatible types in assignment (expression has type "object", variable has type "type[list[Any]]") [assignment]
- ops/charm.py:1963: error: Incompatible types in assignment (expression has type "str", variable has type "_MountDict") [assignment]
- ops/charm.py:1969: error: Argument 1 to "add_location" of "ContainerStorageMeta" has incompatible type "_MountDict"; expected "str" [arg-type]
- ops/charm.py:1971: error: Argument 2 to "ContainerStorageMeta" has incompatible type "_MountDict"; expected "str" [arg-type]
- ops/_main.py:159: error: Argument 2 to "next" has incompatible type "None"; expected "Storage" [arg-type]
- ops/_main.py:160: error: Incompatible types in assignment (expression has type "JujuStorage | SQLiteStorage", variable has type "Storage") [assignment]
- ops/_main.py:462: error: Incompatible types in assignment (expression has type "SQLiteStorage", variable has type "JujuStorage") [assignment]
- ops/main.py:25: error: Unused "type: ignore" comment [unused-ignore]
- ops/main.py:26: error: Unused "type: ignore" comment [unused-ignore]
- ops/main.py:27: error: Unused "type: ignore" comment [unused-ignore]
- ops/main.py:28: error: Unused "type: ignore" comment [unused-ignore]
- ops/_private/harness.py:70: error: Unused "type: ignore" comment [unused-ignore]
- ops/_private/harness.py:75: error: Name "State" already defined (possibly by an import) [no-redef]
- ops/_private/harness.py:308: error: Argument 2 to "Model" has incompatible type "_TestingModelBackend"; expected "_ModelBackend" [arg-type]
- ops/_private/harness.py:383: error: Argument 1 to "_set_can_connect" of "_TestingModelBackend" has incompatible type "Client"; expected "_TestingPebbleClient" [arg-type]
- ops/_private/harness.py:424: error: Name "self._charm_cls.on.__class__" is not defined [name-defined]
- ops/_private/harness.py:427: error: Argument 1 to "__get__" of "ObjectEvents" has incompatible type "None"; expected "Object" [arg-type]
- ops/_private/harness.py:429: error: Name "self._charm_cls" is not defined [name-defined]
- ops/_private/harness.py:435: error: Unused "type: ignore" comment [unused-ignore]
- ops/_private/harness.py:476: error: Argument 3 to "Storage" has incompatible type "_TestingModelBackend"; expected "_ModelBackend" [arg-type]
- ops/_private/harness.py:576: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
- ops/_private/harness.py:597: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
- ops/_private/harness.py:619: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
- ops/_private/harness.py:657: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
- ops/_private/harness.py:796: error: Argument 3 to "Storage" has incompatible type "_TestingModelBackend"; expected "_ModelBackend" [arg-type]
... (truncated 55 lines) ...
SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
+ rss/core.py:232: error: Need type annotation for "match_rule" [var-annotated]
+ rss/core.py:272: error: Need type annotation for "roles" [var-annotated]
setuptools (https://github.com/pypa/setuptools): 2.04x faster (39.9s -> 19.5s in a single noisy sample)
+ setuptools/msvc.py:1448: 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.14.0+dev.358c0a7c7a0540de6ff8449753762956b6fc67dd
+ setuptools/msvc.py:1448: : note: use --pdb to drop into pdb
- 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:156: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/dist.py:726: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/setopt.py:40: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/build_meta.py:94: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/build_meta.py:98: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/tests/test_core_metadata.py:428: error: Argument 1 to "flatten" of "Generator" has incompatible type "Message[str, str]"; expected "EmailMessage" [arg-type]
- 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:51: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/build_py.py:138: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/build_ext.py:251: error: Unused "type: ignore" comment [unused-ignore]
- setuptools/command/install.py:154: 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 109, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 193, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 194, in build
+ result = _build(
+ File "/build.py", line 269, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2940, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3338, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3439, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2309, 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 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1196, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2462, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 827, in accept
+ return visitor.visit_func_def(self)
+ File "/checker.py", line 1046, in visit_func_def
+ self._visit_func_def(defn)
+ File "/checker.py", line 1050, in _visit_func_def
+ self.check_func_item(defn, name=defn.name)
+ File "/checker.py", line 1084, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1360, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1364, in accept
+ return visitor.visit_assignment_stmt(self)
+ File "/checker.py", line 3001, in visit_assignment_stmt
+ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None, s.new_syntax)
+ File "/checker.py", line 3218, in check_assignment
+ rvalue_type = self.expr_checker.accept(rvalue, type_context=type_context)
+ File "/checkexpr.py", line 5926, in accept
+ typ = node.accept(self)
+ ^^^^^^^^^^^^^^^^^
+ File "/nodes.py", line 1984, in accept
+ return visitor.visit_call_expr(self)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 486, in visit_call_expr
+ return self.check_typeddict_call(e, typeddict_type, typeddict_callable)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ TypeError: ExpressionChecker.check_typeddict_call() missing 3 required positional arguments: 'args', 'context', and 'orig_callee'
altair (https://github.com/vega/altair): 5.79x faster (123.9s -> 21.4s in a single noisy sample)
+ altair/utils/selection.py:49: 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.14.0+dev.358c0a7c7a0540de6ff8449753762956b6fc67dd
+ altair/utils/selection.py:49: : note: use --pdb to drop into pdb
- altair/utils/core.py:328: error: Incompatible return value type (got "numpy.bool[builtins.bool]", expected "builtins.bool") [return-value]
- tests/vegalite/v5/test_theme.py:1060: error: Redundant cast to "str" [redundant-cast]
- tests/vegalite/v5/test_renderers.py:16: 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 109, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 193, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 194, in build
+ result = _build(
+ File "/build.py", line 269, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2940, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3338, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3439, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2309, 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 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1196, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2462, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 939, in accept
+ return visitor.visit_decorator(self)
+ File "/checker.py", line 5112, in visit_decorator
+ self.visit_decorator_inner(e)
+ File "/checker.py", line 5117, in visit_decorator_inner
+ self.check_func_item(e.func, name=e.func.name, allow_empty=allow_empty)
+ File "/checker.py", line 1084, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1360, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1545, in accept
+ return visitor.visit_if_stmt(self)
+ File "/checker.py", line 4742, in visit_if_stmt
+ self.accept(s.else_body)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1364, in accept
+ return visitor.visit_assignment_stmt(self)
+ File "/checker.py", line 3001, in visit_assignment_stmt
+ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None, s.new_syntax)
+ File "/checker.py", line 3218, in check_assignment
+ rvalue_type = self.expr_checker.accept(rvalue, type_context=type_context)
+ File "/checkexpr.py", line 5926, in accept
+ typ = node.accept(self)
+ ^^^^^^^^^^^^^^^^^
+ File "/nodes.py", line 1984, in accept
+ return visitor.visit_call_expr(self)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 508, in visit_call_expr
+ return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 642, in visit_call_expr_inner
+ ret_type = self.check_call_expr_with_callee_type(
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 1498, in check_call_expr_with_callee_type
+ return self.check_union_call_expr(e, object_type, member)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 1526, in check_union_call_expr
+ item = analyze_member_access(
+ ^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkmember.py", line 210, in analyze_member_access
+ return analyze_dict_get(typ, context)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ TypeError: analyze_dict_get() missing 1 required positional argument: 'context'
pydantic (https://github.com/pydantic/pydantic): 1.99x faster (30.1s -> 15.1s in a single noisy sample)
+ pydantic/v1/networks.py:228: 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.14.0+dev.358c0a7c7a0540de6ff8449753762956b6fc67dd
+ pydantic/v1/networks.py:228: : note: use --pdb to drop into pdb
- pydantic/v1/typing.py:41: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/typing.py:50: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/typing.py:159: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/validators.py:540: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/color.py:199: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/types.py:486: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/types.py:528: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/types.py:575: 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 109, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 193, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 194, in build
+ result = _build(
+ File "/build.py", line 269, in _build
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 2940, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3338, in process_graph
+ process_stale_scc(graph, scc, manager)
+ File "/build.py", line 3439, in process_stale_scc
+ graph[id].type_check_first_pass()
+ File "/build.py", line 2309, 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 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1196, in accept
+ return visitor.visit_class_def(self)
+ File "/checker.py", line 2462, in visit_class_def
+ self.accept(defn.defs)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 939, in accept
+ return visitor.visit_decorator(self)
+ File "/checker.py", line 5112, in visit_decorator
+ self.visit_decorator_inner(e)
+ File "/checker.py", line 5117, in visit_decorator_inner
+ self.check_func_item(e.func, name=e.func.name, allow_empty=allow_empty)
+ File "/checker.py", line 1084, in check_func_item
+ self.check_func_def(defn, typ, name, allow_empty)
+ File "/checker.py", line 1360, in check_func_def
+ self.accept(item.body)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1277, in accept
+ return visitor.visit_block(self)
+ File "/checker.py", line 2952, in visit_block
+ self.accept(s)
+ File "/checker.py", line 592, in accept
+ stmt.accept(self)
+ File "/nodes.py", line 1364, in accept
+ return visitor.visit_assignment_stmt(self)
+ File "/checker.py", line 3001, in visit_assignment_stmt
+ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None, s.new_syntax)
+ File "/checker.py", line 3218, in check_assignment
+ rvalue_type = self.expr_checker.accept(rvalue, type_context=type_context)
+ File "/checkexpr.py", line 5926, in accept
+ typ = node.accept(self)
+ ^^^^^^^^^^^^^^^^^
+ File "/nodes.py", line 1984, in accept
+ return visitor.visit_call_expr(self)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/checkexpr.py", line 486, in visit_call_expr
+ return self.check_typeddict_call(e, typeddict_type, typeddict_callable)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ TypeError: ExpressionChecker.check_typeddict_call() missing 3 required positional arguments: 'args', 'context', and 'orig_callee'
- pydantic/v1/networks.py:237: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/networks.py:237: error: Unsupported type "dict[str, str]" for ** expansion in TypedDict [typeddict-item]
- pydantic/v1/networks.py:237: note: Error code "typeddict-item" not covered by "type: ignore" comment
- pydantic/v1/networks.py:345: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/networks.py:680: error: Unused "type: ignore" comment [unused-ignore]
- pydantic/v1/parse.py:18: error: Incompatible default for argument "content_type" (default has type "None", argument has type "str") [assignment]
- pydantic/v1/parse.py:18: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/parse.py:18: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/parse.py:20: error: Incompatible default for argument "proto" (default has type "None", argument has type "Protocol") [assignment]
- pydantic/v1/parse.py:20: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/parse.py:20: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/parse.py:50: error: Incompatible default for argument "content_type" (default has type "None", argument has type "str") [assignment]
- pydantic/v1/parse.py:50: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/parse.py:50: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/parse.py:52: error: Incompatible default for argument "proto" (default has type "None", argument has type "Protocol") [assignment]
- pydantic/v1/parse.py:52: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/parse.py:52: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/json.py:38: error: Unsupported operand types for >= ("Literal['n']" and "int") [operator]
- pydantic/v1/json.py:38: error: Unsupported operand types for >= ("Literal['N']" and "int") [operator]
- pydantic/v1/json.py:38: error: Unsupported operand types for >= ("Literal['F']" and "int") [operator]
- pydantic/v1/json.py:38: note: Left operand is of type "Literal['n', 'N', 'F'] | int"
- pydantic/v1/json.py:80: error: Argument 1 to "asdict" has incompatible type "DataclassInstance | type[DataclassInstance]"; expected "DataclassInstance" [arg-type]
- pydantic/v1/tools.py:45: error: Incompatible default for argument "content_type" (default has type "None", argument has type "str") [assignment]
- pydantic/v1/tools.py:45: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/tools.py:45: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/tools.py:47: error: Incompatible default for argument "proto" (default has type "None", argument has type "Protocol") [assignment]
- pydantic/v1/tools.py:47: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/tools.py:47: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/tools.py:67: error: Incompatible default for argument "content_type" (default has type "None", argument has type "str") [assignment]
- pydantic/v1/tools.py:67: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/tools.py:67: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/tools.py:69: error: Incompatible default for argument "proto" (default has type "None", argument has type "Protocol") [assignment]
- pydantic/v1/tools.py:69: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/tools.py:69: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pydantic/v1/main.py:533: error: Incompatible default for argument "content_type" (default has type "None", argument has type "str") [assignment]
- pydantic/v1/main.py:533: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pydantic/v1/main.py:533: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
... (truncated 6253 lines) ...``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #17684