mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Add support for functools.partial

Open hauntsaninja opened this issue 5 months ago • 11 comments

Fixes #1484

Turns out that this is currently the second most popular mypy issue (and first most popular is a type system feature request that would need a PEP). I'm sure there's stuff missing, but this should handle most cases.

hauntsaninja avatar Feb 23 '24 06:02 hauntsaninja

Diff from mypy_primer, showing the effect of this PR on open source code:

anyio (https://github.com/agronholm/anyio)
- src/anyio/_backends/_trio.py:376: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_trio.py:961: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_trio.py:962: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_asyncio.py:1654: error: Unused "type: ignore" comment  [unused-ignore]
+ src/anyio/_backends/_trio.py:226: 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.10.0+dev.17d1a296336f343fe2b436788dc1d2bc96d68fed
+ src/anyio/_backends/_trio.py:226: : note: use --pdb to drop into pdb
+ src/anyio/_core/_fileio.py:382: error: Argument 1 to "run_sync" has incompatible type "partial"; expected "Callable[[Path, int], None]"  [arg-type]
+ src/anyio/_core/_fileio.py:382: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/anyio/_core/_fileio.py:549: error: Argument 1 to "run_sync" has incompatible type "partial"; expected "Callable[[], str | PathLike[str]]"  [arg-type]
+ src/anyio/_core/_fileio.py:549: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/anyio/_core/_fileio.py:568: error: Argument 1 to "run_sync" has incompatible type "partial"; expected "Callable[[Path], stat_result]"  [arg-type]
+ src/anyio/_core/_fileio.py:568: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ 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 100, in main
+     res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+   File "/main.py", line 182, in run_build
+     res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+   File "/build.py", line 192, in build
+     result = _build(
+   File "/build.py", line 266, in _build
+     graph = dispatch(sources, manager, stdout)
+   File "/build.py", line 2942, in dispatch
+     process_graph(graph, manager)
+   File "/build.py", line 3340, in process_graph
+     process_stale_scc(graph, scc, manager)
+   File "/build.py", line 3441, in process_stale_scc
+     graph[id].type_check_first_pass()
+   File "/build.py", line 2310, in type_check_first_pass
+     self.type_checker().check_first_pass()
+   File "/checker.py", line 481, in check_first_pass
+     self.accept(d)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1142, in accept
+     return visitor.visit_class_def(self)
+   File "/checker.py", line 2313, in visit_class_def
+     self.accept(defn.defs)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1223, in accept
+     return visitor.visit_block(self)
+   File "/checker.py", line 2775, in visit_block
+     self.accept(s)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 787, in accept
+     return visitor.visit_func_def(self)
+   File "/checker.py", line 1005, in visit_func_def
+     self._visit_func_def(defn)
+   File "/checker.py", line 1009, in _visit_func_def
+     self.check_func_item(defn, name=defn.name)
+   File "/checker.py", line 1082, in check_func_item
+     self.check_func_def(defn, typ, name, allow_empty)
+   File "/checker.py", line 1298, in check_func_def
+     self.accept(item.body)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1223, in accept
+     return visitor.visit_block(self)
+   File "/checker.py", line 2775, in visit_block
+     self.accept(s)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1243, in accept
+     return visitor.visit_expression_stmt(self)
+   File "/checker.py", line 4404, in visit_expression_stmt
+     expr_type = self.expr_checker.accept(s.expr, allow_none_return=True, always_allow_any=True)
+   File "/checkexpr.py", line 5738, in accept
+     typ = self.visit_call_expr(node, allow_none_return=True)
+   File "/checkexpr.py", line 476, in visit_call_expr
+     return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+   File "/checkexpr.py", line 605, in visit_call_expr_inner
+     ret_type = self.check_call_expr_with_callee_type(
+   File "/checkexpr.py", line 1443, in check_call_expr_with_callee_type
+     ret_type, callee_type = self.check_call(
+   File "/checkexpr.py", line 1553, in check_call
+     return self.check_any_type_call(args, callee)
+   File "/checkexpr.py", line 3200, in check_any_type_call
+     self.infer_arg_types_in_empty_context(args)
+   File "/checkexpr.py", line 1871, in infer_arg_types_in_empty_context
+     arg_type = self.accept(arg)
+   File "/checkexpr.py", line 5746, in accept
+     typ = node.accept(self)
+   File "/nodes.py", line 1904, in accept
+     return visitor.visit_call_expr(self)
+   File "/checkexpr.py", line 476, in visit_call_expr
+     return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+   File "/checkexpr.py", line 605, in visit_call_expr_inner
+     ret_type = self.check_call_expr_with_callee_type(
+   File "/checkexpr.py", line 1443, in check_call_expr_with_callee_type
+     ret_type, callee_type = self.check_call(
+   File "/checkexpr.py", line 1538, in check_call
+     return self.check_callable_call(
+   File "/checkexpr.py", line 1780, in check_callable_call
+     new_ret_type = self.apply_function_plugin(
+   File "/checkexpr.py", line 1217, in apply_function_plugin
+     return callback(
+   File "/plugins/functools.py", line 171, in partial_new_callback
+     arg_type = bound.arg_types[i]
+ IndexError: list index out of range

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "Function"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | None"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | Literal[Sentinels.unspecified]"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "bool"  [arg-type]
+ Tools/clinic/clinic.py:4095: error: Incompatible types in assignment (expression has type "partial", target has type "Callable[..., CConverter]")  [assignment]
+ Tools/clinic/clinic.py:4095: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/actions.py:127: error: Incompatible return value type (got "partial", expected "Callable[[FileTab], bool]")  [return-value]
+ porcupine/actions.py:127: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/autocomplete.py:545: error: Argument 3 to "bind_with_data" has incompatible type "partial"; expected "Callable[[EventWithData], str | None]"  [arg-type]
+ porcupine/plugins/autocomplete.py:545: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/urls.py:84: error: Argument 3 to "add_scroll_command" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ porcupine/plugins/urls.py:84: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/menubar.py:305: error: Argument 1 to "append" of "list" has incompatible type "partial"; expected "Callable[..., None]"  [arg-type]
+ porcupine/menubar.py:305: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/pastebin.py:385: error: Argument 2 to "run_in_thread" has incompatible type "partial"; expected "Callable[[bool, str | Any], None]"  [arg-type]
+ porcupine/plugins/pastebin.py:385: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "submit" of "Executor" has incompatible type "partial"; expected "Callable[[VarArg(Any), KwArg(Any)], dict[Path, str]]"  [arg-type]
+ porcupine/plugins/git_status.py:139: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]
+ porcupine/plugins/python_tools.py:69: error: Argument "callback" to "register_filetab_action" has incompatible type "partial"; expected "Callable[[FileTab], None]"  [arg-type]
+ porcupine/plugins/python_tools.py:69: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/python_tools.py:76: error: Argument "callback" to "register_filetab_action" has incompatible type "partial"; expected "Callable[[FileTab], None]"  [arg-type]
+ porcupine/plugins/python_tools.py:76: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ porcupine/plugins/run/no_terminal.py:421: error: Incompatible return value type (got "partial", expected "Callable[[], None] | None")  [return-value]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/cli/cmdoptions.py:121: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:121: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:130: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:130: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:142: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:142: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:154: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:154: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:167: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:167: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:175: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:175: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:182: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:182: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:192: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:192: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:201: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:201: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:210: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:210: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:224: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:224: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:234: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:234: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:245: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:245: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:255: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:255: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:268: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:268: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:277: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:277: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:287: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:287: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:314: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:314: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:328: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:328: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:339: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:339: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:367: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:367: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:451: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:451: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:532: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:532: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:591: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:591: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:612: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:612: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:628: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:628: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:677: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:677: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:717: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:717: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:726: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:726: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:736: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:736: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:744: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:744: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:755: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:755: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:840: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:840: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/pip/_internal/cli/cmdoptions.py:854: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., Option]")  [assignment]
+ src/pip/_internal/cli/cmdoptions.py:854: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

... (truncated 38 lines) ...

pylint (https://github.com/pycqa/pylint)
+ pylint/lint/pylinter.py:949: error: Incompatible types in "yield" (actual type "partial", expected type "Callable[[Any], bool | None]")  [misc]
+ pylint/lint/pylinter.py:949: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

psycopg (https://github.com/psycopg/psycopg)
+ psycopg/psycopg/_cursor_base.py:424: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:424: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ psycopg/psycopg/_cursor_base.py:536: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:536: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ psycopg/psycopg/_cursor_base.py:557: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:557: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ psycopg/psycopg/_connection_base.py:117: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[PGresult], None] | None")  [assignment]
+ psycopg/psycopg/_connection_base.py:118: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[PGnotify], None] | None")  [assignment]
+ psycopg/psycopg/_connection_base.py:451: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:451: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ psycopg/psycopg/client_cursor.py:69: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ psycopg/psycopg/client_cursor.py:69: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ tests/scripts/pipeline-demo.py:154: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ tests/scripts/pipeline-demo.py:154: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ tests/scripts/pipeline-demo.py:160: error: Argument 1 to "append" of "deque" has incompatible type "partial"; expected "Callable[[], None]"  [arg-type]
+ tests/scripts/pipeline-demo.py:160: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/gateway.py:895: error: Argument "check" to "wait_for" of "SteamWebSocket" has incompatible type "partial"; expected "Callable[[CMsgClientPersonaState], bool]"  [arg-type]
+ steam/gateway.py:895: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/sql.py:1074: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[Any, list[str], Any], int]")  [assignment]
+ pandas/io/sql.py:1074: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/core/window/rolling.py:1393: error: Argument 1 to "_apply" of "Window" has incompatible type "partial"; expected "Callable[[ndarray[Any, Any], int, int], ndarray[Any, Any]]"  [arg-type]
+ pandas/core/window/rolling.py:1393: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/core/window/rolling.py:1499: error: Argument "kwargs" to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/window/rolling.py:1698: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[ndarray[Any, Any], ndarray[Any, Any], ndarray[Any, Any], int], ndarray[Any, Any]]")  [assignment]
+ pandas/core/window/rolling.py:1698: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/core/tools/datetimes.py:995: error: Argument "errors" to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3855: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4380: error: Argument "qs" to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4412: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/io/formats/style_render.py:139: error: Argument 1 to "defaultdict" has incompatible type "Callable[[], partial]"; expected "Callable[[], Callable[[Any], str]] | None"  [arg-type]
+ pandas/io/formats/style_render.py:139: error: Incompatible return value type (got "partial", expected "Callable[[Any], str]")  [return-value]
+ pandas/io/formats/style_render.py:139: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/io/formats/style_render.py:142: error: Argument 1 to "defaultdict" has incompatible type "Callable[[], partial]"; expected "Callable[[], Callable[[Any], str]] | None"  [arg-type]
+ pandas/io/formats/style_render.py:142: error: Incompatible return value type (got "partial", expected "Callable[[Any], str]")  [return-value]
+ pandas/io/formats/style_render.py:142: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/io/formats/style_render.py:145: error: Argument 1 to "defaultdict" has incompatible type "Callable[[], partial]"; expected "Callable[[], Callable[[Any], str]] | None"  [arg-type]
+ pandas/io/formats/style_render.py:145: error: Incompatible return value type (got "partial", expected "Callable[[Any], str]")  [return-value]
+ pandas/io/formats/style_render.py:145: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/io/formats/style_render.py:1555: error: Incompatible types in assignment (expression has type "partial", target has type "Callable[[Any], str]")  [assignment]
+ pandas/io/formats/style_render.py:1555: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/io/formats/style_render.py:1559: error: Incompatible types in assignment (expression has type "partial", target has type "Callable[[Any], str]")  [assignment]
+ pandas/io/formats/style_render.py:1559: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/io/formats/style_render.py:1838: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[Any], str]")  [assignment]
+ pandas/io/formats/style_render.py:1838: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ pandas/tests/indexes/test_base.py:1603: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[P, T]")  [assignment]
+ starlette/concurrency.py:41: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ starlette/responses.py:265: error: Argument 1 to "wrap" has incompatible type "partial"; expected "Callable[[], Awaitable[None]]"  [arg-type]
+ starlette/responses.py:265: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ tests/test__utils.py:28: error: Unused "type: ignore" comment  [unused-ignore]
+ starlette/middleware/cors.py:145: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[MutableMapping[str, Any]], Awaitable[None]]")  [assignment]
+ starlette/middleware/cors.py:145: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ tests/conftest.py:18: error: Incompatible return value type (got "partial", expected "Callable[..., TestClient]")  [return-value]
+ tests/conftest.py:18: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ tests/test_routing.py:1293: error: Argument "app" to "Mount" has incompatible type "partial"; expected "Optional[Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[None]]], Awaitable[None]]]"  [arg-type]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/_vendor/starlette/concurrency.py:34: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[..., T]")  [assignment]
+ src/prefect/_vendor/starlette/concurrency.py:34: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/prefect/_vendor/starlette/responses.py:258: error: Argument 1 to "wrap" has incompatible type "partial"; expected "Callable[[], Awaitable[None]]"  [arg-type]
+ src/prefect/_vendor/starlette/responses.py:258: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/prefect/_vendor/starlette/middleware/cors.py:145: error: Incompatible types in assignment (expression has type "partial", variable has type "Callable[[MutableMapping[str, Any]], Awaitable[None]]")  [assignment]
+ src/prefect/_vendor/starlette/middleware/cors.py:145: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"
+ src/prefect/utilities/visualization.py:45: error: Argument 1 to "wait_for_call_in_loop_thread" of "from_async" has incompatible type "partial"; expected "Callable[[], Awaitable[Any]] | Call[Awaitable[Any]]"  [arg-type]
+ src/prefect/utilities/callables.py:207: error: Incompatible return value type (got "partial", expected "Callable[[], bytes]")  [return-value]
+ src/prefect/utilities/callables.py:207: note: "partial.__call__" has type "Callable[[VarArg(Any), KwArg(Any)], _T]"

... (truncated 494 lines) ...```

github-actions[bot] avatar Feb 23 '24 06:02 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "Function"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | None"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | Literal[Sentinels.unspecified]"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "bool"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument "bar_type" to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

anyio (https://github.com/agronholm/anyio)
- src/anyio/_backends/_trio.py:376: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_trio.py:961: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_trio.py:962: error: Unused "type: ignore" comment  [unused-ignore]
- src/anyio/_backends/_asyncio.py:1654: error: Unused "type: ignore" comment  [unused-ignore]
+ src/anyio/_backends/_trio.py:226: 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.10.0+dev.12a3c68148b6b25ea59fb5a08d1ff0d2992099c3
+ src/anyio/_backends/_trio.py:226: : 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 100, in main
+     res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+   File "/main.py", line 182, in run_build
+     res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+   File "/build.py", line 192, in build
+     result = _build(
+   File "/build.py", line 266, in _build
+     graph = dispatch(sources, manager, stdout)
+   File "/build.py", line 2942, in dispatch
+     process_graph(graph, manager)
+   File "/build.py", line 3340, in process_graph
+     process_stale_scc(graph, scc, manager)
+   File "/build.py", line 3441, in process_stale_scc
+     graph[id].type_check_first_pass()
+   File "/build.py", line 2310, in type_check_first_pass
+     self.type_checker().check_first_pass()
+   File "/checker.py", line 481, in check_first_pass
+     self.accept(d)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1142, in accept
+     return visitor.visit_class_def(self)
+   File "/checker.py", line 2313, in visit_class_def
+     self.accept(defn.defs)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1223, in accept
+     return visitor.visit_block(self)
+   File "/checker.py", line 2775, in visit_block
+     self.accept(s)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 787, in accept
+     return visitor.visit_func_def(self)
+   File "/checker.py", line 1005, in visit_func_def
+     self._visit_func_def(defn)
+   File "/checker.py", line 1009, in _visit_func_def
+     self.check_func_item(defn, name=defn.name)
+   File "/checker.py", line 1082, in check_func_item
+     self.check_func_def(defn, typ, name, allow_empty)
+   File "/checker.py", line 1298, in check_func_def
+     self.accept(item.body)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1223, in accept
+     return visitor.visit_block(self)
+   File "/checker.py", line 2775, in visit_block
+     self.accept(s)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1243, in accept
+     return visitor.visit_expression_stmt(self)
+   File "/checker.py", line 4404, in visit_expression_stmt
+     expr_type = self.expr_checker.accept(s.expr, allow_none_return=True, always_allow_any=True)
+   File "/checkexpr.py", line 5738, in accept
+     typ = self.visit_call_expr(node, allow_none_return=True)
+   File "/checkexpr.py", line 476, in visit_call_expr
+     return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+   File "/checkexpr.py", line 605, in visit_call_expr_inner
+     ret_type = self.check_call_expr_with_callee_type(
+   File "/checkexpr.py", line 1443, in check_call_expr_with_callee_type
+     ret_type, callee_type = self.check_call(
+   File "/checkexpr.py", line 1553, in check_call
+     return self.check_any_type_call(args, callee)
+   File "/checkexpr.py", line 3200, in check_any_type_call
+     self.infer_arg_types_in_empty_context(args)
+   File "/checkexpr.py", line 1871, in infer_arg_types_in_empty_context
+     arg_type = self.accept(arg)
+   File "/checkexpr.py", line 5746, in accept
+     typ = node.accept(self)
+   File "/nodes.py", line 1904, in accept
+     return visitor.visit_call_expr(self)
+   File "/checkexpr.py", line 476, in visit_call_expr
+     return self.visit_call_expr_inner(e, allow_none_return=allow_none_return)
+   File "/checkexpr.py", line 605, in visit_call_expr_inner
+     ret_type = self.check_call_expr_with_callee_type(
+   File "/checkexpr.py", line 1443, in check_call_expr_with_callee_type
+     ret_type, callee_type = self.check_call(
+   File "/checkexpr.py", line 1538, in check_call
+     return self.check_callable_call(
+   File "/checkexpr.py", line 1780, in check_callable_call
+     new_ret_type = self.apply_function_plugin(
+   File "/checkexpr.py", line 1217, in apply_function_plugin
+     return callback(
+   File "/plugins/functools.py", line 172, in partial_new_callback
+     arg_type = bound.arg_types[i]
+ IndexError: list index out of range

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/window/rolling.py:1499: error: Argument "kwargs" to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:995: error: Argument "errors" to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3855: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4380: error: Argument "qs" to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4412: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/tests/indexes/test_base.py:1603: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:1610: error: Argument "task_run_name" to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument "worker" to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1067: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 428 lines) ...

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:338: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2649: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/pallas/pallas_call.py:419: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument "block_q" to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument "mask_value" to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:392:50: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:392:50: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/operations/tests/test_generic.py:112: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:113: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:115: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:399: 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.10.0+dev.12a3c68148b6b25ea59fb5a08d1ff0d2992099c3
+ src/hydra_zen/wrapper/_implementations.py:399: : note: use --pdb to drop into pdb
- src/hydra_zen/wrapper/_implementations.py:256: error: Unused "type: ignore" comment  [unused-ignore]
- src/hydra_zen/wrapper/_implementations.py:401: error: "object" not callable  [operator]
- src/hydra_zen/wrapper/_implementations.py:503: error: Incompatible types in assignment (expression has type "Zen[P, R]", variable has type "Callable[[Any], Any]")  [assignment]
- src/hydra_zen/wrapper/_implementations.py:503: note: "Zen[P, R].__call__" has type "Callable[[DataClass_ | type[DataClass_] | dict[Any, Any] | DictConfig | str], R]"
- src/hydra_zen/wrapper/_implementations.py:906: error: Unused "type: ignore" comment  [unused-ignore]
- src/hydra_zen/wrapper/_implementations.py:908: error: Incompatible return value type (got "type[object]", expected "DataClass_ | type[DataClass_] | ListConfig | DictConfig")  [return-value]
- src/hydra_zen/wrapper/_implementations.py:1452: error: Incompatible default for argument "to_config" (default has type "Callable[[Callable[..., Any] | DataClass_ | list[Any] | dict[Any, Any] | ListConfig | DictConfig, type[BuildsFn[Any]], KwArg(Any)], DataClass_ | type[DataClass_] | ListConfig | DictConfig]", argument has type "Callable[[F], Any]")  [assignment]
- src/hydra_zen/wrapper/_implementations.py:1725: error: Unsupported operand types for + ("list[None]" and "list[str]")  [operator]
- src/hydra_zen/wrapper/_implementations.py:2094: error: Incompatible types in assignment (expression has type "Any | None", variable has type "dict[str, Any]")  [assignment]
+ src/hydra_zen/wrapper/_implementations.py:399: error: Too few arguments for "run" of "Context"  [call-arg]
+ 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 100, in main
+     res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+   File "/main.py", line 182, in run_build
+     res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+   File "/build.py", line 192, in build
+     result = _build(
+   File "/build.py", line 266, in _build
+     graph = dispatch(sources, manager, stdout)
+   File "/build.py", line 2942, in dispatch
+     process_graph(graph, manager)
+   File "/build.py", line 3340, in process_graph
+     process_stale_scc(graph, scc, manager)
+   File "/build.py", line 3441, in process_stale_scc
+     graph[id].type_check_first_pass()
+   File "/build.py", line 2310, in type_check_first_pass
+     self.type_checker().check_first_pass()
+   File "/checker.py", line 481, in check_first_pass
+     self.accept(d)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1142, in accept
+     return visitor.visit_class_def(self)
+   File "/checker.py", line 2313, in visit_class_def
+     self.accept(defn.defs)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 1223, in accept
+     return visitor.visit_block(self)
+   File "/checker.py", line 2775, in visit_block
+     self.accept(s)
+   File "/checker.py", line 595, in accept
+     stmt.accept(self)
+   File "/nodes.py", line 787, in accept
+     return visitor.visit_func_def(self)
+   File "/checker.py", line 1005, in visit_func_def
+     self._visit_func_def(defn)
+   File "/checker.py", line 1009, in _visit_func_def

... (truncated 86 lines) ...```

github-actions[bot] avatar Feb 23 '24 07:02 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "Function"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | None"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "str | Literal[Sentinels.unspecified]"  [arg-type]
+ Tools/clinic/clinic.py:4094: error: Argument 1 to "str_converter" has incompatible type "**dict[str, set[type[object]] | bool]"; expected "bool"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument "bar_type" to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/window/rolling.py:1499: error: Argument "kwargs" to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:995: error: Argument "errors" to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3855: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4380: error: Argument "qs" to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4412: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/tests/indexes/test_base.py:1603: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:1610: error: Argument "task_run_name" to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument "worker" to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument "crop_size" to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1067: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 428 lines) ...

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:338: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2649: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/pallas/pallas_call.py:419: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument "block_q" to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument "mask_value" to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:392:50: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:392:50: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/operations/tests/test_generic.py:112: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:113: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:115: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:399: error: Too few arguments for "run" of "Context"  [call-arg]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

github-actions[bot] avatar Feb 23 '24 08:02 github-actions[bot]

Looking randomly through primer, looks pretty good:

  • aiohttp is a true positive (Middleware needs to be typed as callback protocol if you want to pass a kwarg to it)
  • ibis has a true positive (tests testing that code crashes in test_generic, couldn't really tell if data_types hits were true positive or not)
  • pip is true positive
  • CPython is probably a true positive? I think it'd be better off just using dict[str, Any] for those kwargs
  • tornado is true positive
  • graphql, extend_schema is true positive (mypy prevents passing TypedDict to dict[str, Any], hopefully PEP 705 will help), tests/validation is true positive (dict is not a GraphQLError)

hauntsaninja avatar Feb 23 '24 08:02 hauntsaninja

Diff from mypy_primer, showing the effect of this PR on open source code:

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument 2 to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/window/rolling.py:1499: error: Argument 3 to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:995: error: Argument 6 to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3855: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4380: error: Argument 3 to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4412: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/tests/indexes/test_base.py:135: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:1610: error: Argument 3 to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument 2 to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1067: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 428 lines) ...

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:338: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2649: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/pallas/pallas_call.py:419: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument 2 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument 4 to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:56:37: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:56:37: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/operations/tests/test_generic.py:147: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:147: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:147: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:58: error: Too few arguments for "run" of "Context"  [call-arg]

github-actions[bot] avatar Feb 23 '24 09:02 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:2799: error: "CConverterClassT" not callable  [misc]

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/misc.py:136: error: "Callable[[FunctionType, Path, BaseException], Any] | Callable[[FunctionType, Path, tuple[type[BaseException], BaseException, TracebackType]], Any]" not callable  [misc]
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument 2 to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

jinja (https://github.com/pallets/jinja)
+ src/jinja2/environment.py:1630: error: overloaded function not callable  [misc]
+ src/jinja2/environment.py:1658: error: overloaded function not callable  [misc]

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/_const.py:43: error: overloaded function not callable  [misc]
+ steam/_const.py:54: error: overloaded function not callable  [misc]
+ steam/ext/commands/commands.py:911: error: overloaded function not callable  [misc]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/common.py:415: error: "type[defaultdict[Any, Any]]" not callable  [misc]
+ pandas/core/computation/align.py:48: error: overloaded function not callable  [misc]
+ pandas/core/window/rolling.py:1499: error: Argument 3 to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:997: error: Argument 6 to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3843: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4368: error: Argument 3 to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4400: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/generic.py:951: error: overloaded function not callable  [misc]
+ pandas/tests/test_downstream.py:268: error: "type[array[Any]]" not callable  [misc]
+ pandas/tests/indexes/datetimes/test_constructors.py:801: error: overloaded function not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:69: error: "_UFunc_Nin2_Nout1[Literal['add'], Literal[22], Literal[0]]" not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:76: error: "_UFunc_Nin1_Nout1[Literal['negative'], Literal[19], None]" not callable  [misc]
+ pandas/tests/indexes/test_base.py:135: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/server.py:1048: error: "type[WebSocketServerProtocol] | Callable[..., WebSocketServerProtocol]" not callable  [misc]
+ src/websockets/legacy/server.py:1086: error: overloaded function not callable  [misc]
+ src/websockets/legacy/client.py:496: error: "type[WebSocketClientProtocol] | Callable[..., WebSocketClientProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:536: error: overloaded function not callable  [misc]
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]
+ src/websockets/legacy/auth.py:180: error: "type[BasicAuthWebSocketServerProtocol] | Callable[..., BasicAuthWebSocketServerProtocol]" not callable  [misc]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

isort (https://github.com/pycqa/isort)
+ isort/exceptions.py:13: error: "Type[ISortError]" not callable  [misc]

SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
+ devtools/runner.py:144: error: overloaded function not callable  [misc]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/utilities/pydantic.py:78: error: overloaded function not callable  [misc]
+ src/prefect/logging/configuration.py:27: error: overloaded function not callable  [misc]
+ src/prefect/engine.py:1610: error: Argument 3 to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument 2 to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
+ xarray_dataclasses/dataarray.py:239: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:281: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:323: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:369: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:240: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:282: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:324: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:370: error: overloaded function not callable  [misc]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

nox (https://github.com/wntrblm/nox)
+ nox/registry.py:69: error: overloaded function not callable  [misc]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

trio (https://github.com/python-trio/trio)
+ src/trio/_path.py:326: error: overloaded function not callable  [misc]
+ src/trio/_subprocess.py:413: error: "Type[Popen[Any]]" not callable  [misc]
+ src/trio/_tests/test_subprocess.py:107: error: overloaded function not callable  [misc]
+ src/trio/_tests/test_subprocess.py:560: error: overloaded function not callable  [misc]
+ src/trio/_tests/test_subprocess.py:576: error: overloaded function not callable  [misc]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"
+ kopf/_core/reactor/orchestration.py:42: error: Unexpected keyword argument "resource" for "__call__" of "WatchStreamProcessor"  [call-arg]
+ kopf/_core/reactor/queueing.py:42: note: "__call__" of "WatchStreamProcessor" defined here

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/validation/rules/possible_type_extensions.py:79: error: overloaded function not callable  [misc]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 429 lines) ...

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/decorators.py:574: error: overloaded function not callable  [misc]

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:339: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2652: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/sparse/linalg.py:36: error: overloaded function not callable  [misc]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/optimize/bfgs.py:67: error: overloaded function not callable  [misc]
+ jax/_src/pallas/pallas_call.py:421: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument 2 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument 4 to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:56:37: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:56:37: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/wsgi.py:240: error: overloaded function not callable  [misc]

streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/streamlit/runtime/caching/hashing_test.py: note: In member "test_partial" of class "HashTest":
+ lib/tests/streamlit/runtime/caching/hashing_test.py:459:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/caching/hashing_test.py:460:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/caching/hashing_test.py:461:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py: note: In member "test_partial" of class "HashTest":
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:366:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:367:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:368:14: error: "Type[int]" not callable  [misc]

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/datatypes/parse.py:119: error: overloaded function not callable  [misc]
+ ibis/expr/datatypes/parse.py:204: error: overloaded function not callable  [misc]
+ ibis/expr/operations/tests/test_generic.py:147: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:147: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:147: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:58: error: Too few arguments for "run" of "Context"  [call-arg]

github-actions[bot] avatar Mar 01 '24 06:03 github-actions[bot]

Looks like callback protocol support hurts overloads more than previously. Probably need to improve extract_callable_type

hauntsaninja avatar Mar 01 '24 08:03 hauntsaninja

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:2799: error: "CConverterClassT" not callable  [misc]

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/misc.py:136: error: "Callable[[FunctionType, Path, BaseException], Any] | Callable[[FunctionType, Path, tuple[type[BaseException], BaseException, TracebackType]], Any]" not callable  [misc]
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument 2 to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

jinja (https://github.com/pallets/jinja)
+ src/jinja2/environment.py:1630: error: overloaded function not callable  [misc]
+ src/jinja2/environment.py:1658: error: overloaded function not callable  [misc]

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/_const.py:43: error: overloaded function not callable  [misc]
+ steam/_const.py:54: error: overloaded function not callable  [misc]
+ steam/ext/commands/commands.py:911: error: overloaded function not callable  [misc]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/common.py:415: error: "type[defaultdict[Any, Any]]" not callable  [misc]
+ pandas/core/computation/align.py:48: error: overloaded function not callable  [misc]
+ pandas/core/window/rolling.py:1499: error: Argument 3 to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:997: error: Argument 6 to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3843: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4368: error: Argument 3 to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4400: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/generic.py:951: error: overloaded function not callable  [misc]
+ pandas/tests/test_downstream.py:268: error: "type[array[Any]]" not callable  [misc]
+ pandas/tests/indexes/datetimes/test_constructors.py:801: error: overloaded function not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:69: error: "_UFunc_Nin2_Nout1[Literal['add'], Literal[22], Literal[0]]" not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:76: error: "_UFunc_Nin1_Nout1[Literal['negative'], Literal[19], None]" not callable  [misc]
+ pandas/tests/indexes/test_base.py:135: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/server.py:1048: error: "type[WebSocketServerProtocol] | Callable[..., WebSocketServerProtocol]" not callable  [misc]
+ src/websockets/legacy/server.py:1086: error: overloaded function not callable  [misc]
+ src/websockets/legacy/client.py:496: error: "type[WebSocketClientProtocol] | Callable[..., WebSocketClientProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:536: error: overloaded function not callable  [misc]
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]
+ src/websockets/legacy/auth.py:180: error: "type[BasicAuthWebSocketServerProtocol] | Callable[..., BasicAuthWebSocketServerProtocol]" not callable  [misc]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/utilities/pydantic.py:78: error: overloaded function not callable  [misc]
+ src/prefect/logging/configuration.py:27: error: overloaded function not callable  [misc]
+ src/prefect/engine.py:1611: error: Argument 3 to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument 2 to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
+ xarray_dataclasses/dataarray.py:239: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:281: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:323: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataarray.py:369: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:240: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:282: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:324: error: overloaded function not callable  [misc]
+ xarray_dataclasses/dataset.py:370: error: overloaded function not callable  [misc]

isort (https://github.com/pycqa/isort)
+ isort/exceptions.py:13: error: "Type[ISortError]" not callable  [misc]

SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
+ devtools/runner.py:144: error: overloaded function not callable  [misc]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

nox (https://github.com/wntrblm/nox)
+ nox/registry.py:69: error: overloaded function not callable  [misc]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

trio (https://github.com/python-trio/trio)
+ src/trio/_path.py:326: error: overloaded function not callable  [misc]
+ src/trio/_subprocess.py:413: error: "Type[Popen[Any]]" not callable  [misc]
+ src/trio/_tests/test_subprocess.py:107: error: overloaded function not callable  [misc]
+ src/trio/_tests/test_subprocess.py:560: error: overloaded function not callable  [misc]
+ src/trio/_tests/test_subprocess.py:576: error: overloaded function not callable  [misc]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"
+ kopf/_core/reactor/orchestration.py:42: error: Unexpected keyword argument "resource" for "__call__" of "WatchStreamProcessor"  [call-arg]
+ kopf/_core/reactor/queueing.py:42: note: "__call__" of "WatchStreamProcessor" defined here

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/validation/rules/possible_type_extensions.py:79: error: overloaded function not callable  [misc]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 429 lines) ...

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

pandera (https://github.com/pandera-dev/pandera)
+ pandera/decorators.py:574: error: overloaded function not callable  [misc]

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:339: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2652: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/sparse/linalg.py:36: error: overloaded function not callable  [misc]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/optimize/bfgs.py:67: error: overloaded function not callable  [misc]
+ jax/_src/pallas/pallas_call.py:421: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument 2 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument 4 to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:56:37: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:56:37: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/wsgi.py:240: error: overloaded function not callable  [misc]

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/datatypes/parse.py:119: error: overloaded function not callable  [misc]
+ ibis/expr/datatypes/parse.py:204: error: overloaded function not callable  [misc]
+ ibis/expr/operations/tests/test_generic.py:147: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:147: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:147: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/streamlit/runtime/caching/hashing_test.py: note: In member "test_partial" of class "HashTest":
+ lib/tests/streamlit/runtime/caching/hashing_test.py:459:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/caching/hashing_test.py:460:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/caching/hashing_test.py:461:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py: note: In member "test_partial" of class "HashTest":
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:366:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:367:14: error: "Type[int]" not callable  [misc]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:368:14: error: "Type[int]" not callable  [misc]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:58: error: Too few arguments for "run" of "Context"  [call-arg]

github-actions[bot] avatar Mar 01 '24 15:03 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:2799: error: "CConverterClassT" not callable  [misc]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/misc.py:136: error: "Callable[[FunctionType, Path, BaseException], Any] | Callable[[FunctionType, Path, tuple[type[BaseException], BaseException, TracebackType]], Any]" not callable  [misc]
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument 2 to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/window/rolling.py:1499: error: Argument 3 to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:997: error: Argument 6 to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3843: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4368: error: Argument 3 to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4400: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/tests/frame/test_ufunc.py:69: error: "_UFunc_Nin2_Nout1[Literal['add'], Literal[22], Literal[0]]" not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:76: error: "_UFunc_Nin1_Nout1[Literal['negative'], Literal[19], None]" not callable  [misc]
+ pandas/tests/indexes/test_base.py:135: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/server.py:1048: error: "type[WebSocketServerProtocol] | Callable[..., WebSocketServerProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:496: error: "type[WebSocketClientProtocol] | Callable[..., WebSocketClientProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]
+ src/websockets/legacy/auth.py:180: error: "type[BasicAuthWebSocketServerProtocol] | Callable[..., BasicAuthWebSocketServerProtocol]" not callable  [misc]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:1611: error: Argument 3 to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument 2 to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

isort (https://github.com/pycqa/isort)
+ isort/exceptions.py:13: error: "Type[ISortError]" not callable  [misc]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"
+ kopf/_core/reactor/orchestration.py:42: error: Unexpected keyword argument "resource" for "__call__" of "WatchStreamProcessor"  [call-arg]
+ kopf/_core/reactor/queueing.py:42: note: "__call__" of "WatchStreamProcessor" defined here

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1067: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 428 lines) ...

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:339: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2652: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/pallas/pallas_call.py:421: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument 2 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument 4 to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:56:37: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:56:37: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/operations/tests/test_generic.py:147: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:147: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:147: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:58: error: Too few arguments for "run" of "Context"  [call-arg]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

github-actions[bot] avatar Mar 01 '24 19:03 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:2259: error: Argument 1 to "_forcibly_shutdown_process_pool_on_exit" has incompatible type "set[anyio.abc._subprocesses.Process]"; expected "set[anyio._backends._asyncio.Process]"  [arg-type]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/misc.py:136: error: "Callable[[FunctionType, Path, BaseException], Any] | Callable[[FunctionType, Path, tuple[type[BaseException], BaseException, TracebackType]], Any]" not callable  [misc]
+ src/pip/_internal/cli/progress_bars.py:66: error: Argument 2 to "_rich_progress_bar" has incompatible type "int | None"; expected "int"  [arg-type]

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/clinic.py:2799: error: "CConverterClassT" not callable  [misc]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/git_status.py:139: error: Argument 1 to "run_git_status" has incompatible type "Path | None"; expected "Path"  [arg-type]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/window/rolling.py:1499: error: Argument 3 to "roll_apply" has incompatible type "bool | bool_"; expected "bool"  [arg-type]
+ pandas/core/tools/datetimes.py:997: error: Argument 6 to "_convert_listlike_datetimes" has incompatible type "bool | Literal[_NoDefault.no_default]"; expected "bool"  [arg-type]
+ pandas/core/groupby/groupby.py:3843: error: Argument "mask" to "group_fillna_indexer" has incompatible type "ndarray[Any, dtype[bool_]] | Any"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/core/groupby/groupby.py:4368: error: Argument 3 to "group_quantile" has incompatible type "str"; expected "Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']"  [arg-type]
+ pandas/core/groupby/groupby.py:4400: error: Argument "mask" to "group_quantile" has incompatible type "ndarray[Any, dtype[bool_]]"; expected "ndarray[Any, dtype[unsignedinteger[_8Bit]]]"  [arg-type]
+ pandas/tests/frame/test_ufunc.py:69: error: "_UFunc_Nin2_Nout1[Literal['add'], Literal[22], Literal[0]]" not callable  [misc]
+ pandas/tests/frame/test_ufunc.py:76: error: "_UFunc_Nin1_Nout1[Literal['negative'], Literal[19], None]" not callable  [misc]
+ pandas/tests/indexes/test_base.py:135: error: Unexpected keyword argument "data" for "RangeIndex"  [call-arg]
+ pandas/core/indexes/range.py:135: note: "RangeIndex" defined here

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/server.py:1048: error: "type[WebSocketServerProtocol] | Callable[..., WebSocketServerProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:496: error: "type[WebSocketClientProtocol] | Callable[..., WebSocketClientProtocol]" not callable  [misc]
+ src/websockets/legacy/client.py:649: error: Redundant cast to "WebSocketClientProtocol"  [redundant-cast]
+ src/websockets/legacy/auth.py:180: error: "type[BasicAuthWebSocketServerProtocol] | Callable[..., BasicAuthWebSocketServerProtocol]" not callable  [misc]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:1611: error: Argument 3 to "create_task_run_then_submit" has incompatible type "int"; expected "str"  [arg-type]
+ src/prefect/cli/worker.py:206: error: Argument 2 to "start_healthcheck_server" has incompatible type "float"; expected "int"  [arg-type]

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/signature.py:173: error: Argument 1 to "_get_validator" has incompatible type "tuple[Literal['return_key']]"; expected "str"  [arg-type]
- koda_validate/signature.py:384: error: Returning Any from function declared to return "_DecoratedFunc"  [no-any-return]
- koda_validate/signature.py:388: error: Returning Any from function declared to return "_DecoratedFunc | Callable[[_DecoratedFunc], _DecoratedFunc]"  [no-any-return]

isort (https://github.com/pycqa/isort)
+ isort/exceptions.py:13: error: "Type[ISortError]" not callable  [misc]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/tcpclient.py:274: error: Argument 1 to "_create_stream" of "TCPClient" has incompatible type "Optional[int]"; expected "int"  [arg-type]
+ tornado/curl_httpclient.py:362: error: Argument 2 to "_curl_header_callback" of "CurlAsyncHTTPClient" has incompatible type "Optional[Callable[[str], None]]"; expected "Callable[[str], None]"  [arg-type]

vision (https://github.com/pytorch/vision)
+ torchvision/models/video/swin_transformer.py:518: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:549: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:580: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/swin_transformer.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:607: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]
+ torchvision/models/video/mvit.py:640: error: Argument 2 to "VideoClassification" has incompatible type "tuple[int]"; expected "tuple[int, int]"  [arg-type]

kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:127: error: Incompatible types in assignment (expression has type "partial[partial[object | Coroutine[None, None, object]]]", variable has type "partial[object | Coroutine[None, None, object | None] | None]")  [assignment]
+ kopf/_core/actions/invocation.py:127: error: Argument 1 to "run" of "Context" has incompatible type "partial[object | Coroutine[None, None, object | None] | None]"; expected "Callable[[VarArg(Any), KwArg(Any)], partial[object | Coroutine[None, None, object]]]"  [arg-type]
+ kopf/_core/actions/invocation.py:127: note: "partial[object | Coroutine[None, None, object | None] | None].__call__" has type "Callable[[VarArg(Any), KwArg(Any)], object | Coroutine[None, None, object | None] | None]"
+ kopf/_core/reactor/orchestration.py:42: error: Unexpected keyword argument "resource" for "__call__" of "WatchStreamProcessor"  [call-arg]
+ kopf/_core/reactor/queueing.py:42: note: "__call__" of "WatchStreamProcessor" defined here

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/extend_schema.py:360: error: Argument 1 to "extend_input_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInputObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:427: error: Argument 1 to "extend_object_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:429: error: Argument 1 to "extend_object_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLObjectTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:467: error: Argument 1 to "extend_interface_type_interfaces" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:469: error: Argument 1 to "extend_interface_type_fields" of "ExtendSchemaImpl" has incompatible type "GraphQLInterfaceTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ src/graphql/utilities/extend_schema.py:491: error: Argument 1 to "extend_union_type_types" of "ExtendSchemaImpl" has incompatible type "GraphQLUnionTypeKwargs"; expected "dict[str, Any]"  [arg-type]
+ tests/validation/test_variables_in_allowed_position.py:174: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:196: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:222: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:240: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:258: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:274: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:290: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:309: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_in_allowed_position.py:328: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:39: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:43: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_variables_are_input_types.py:48: error: List item 2 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:176: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:193: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:210: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:227: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:245: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:262: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:280: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:297: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:314: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:332: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:349: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:366: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:384: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:401: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:418: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:436: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:454: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:472: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:490: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:509: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:527: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:545: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:564: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:582: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:600: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:664: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:681: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:810: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:814: error: List item 1 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:831: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:848: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:945: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:966: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:986: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1006: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1035: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]
+ tests/validation/test_values_of_correct_type.py:1067: error: List item 0 has incompatible type "dict[str, Sequence[Sequence[object]]]"; expected "GraphQLError"  [list-item]

... (truncated 428 lines) ...

jax (https://github.com/google/jax)
+ jax/_src/linear_util.py:339: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/interpreters/partial_eval.py:2652: error: Argument 2 to "_eval_jaxpr_padded" has incompatible type "Sequence[Any]"; expected "list[Any]"  [arg-type]
+ jax/_src/custom_derivatives.py:245: error: Missing positional argument "tree" in call to "tree_map"  [call-arg]
+ jax/_src/nn/functions.py:483: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int | tuple[int, ...] | None, Array | Any | Any | Any | bool | int | float | complex | None, Array | Any | Any | Any | bool | int | float | complex | None], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:579: error: Argument 1 to "custom_jvp" has incompatible type "Callable[[Array | Any | Any | Any | bool | int | float | complex, int], Array]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/scipy/special.py:1601: error: Argument 1 to "_expn3" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1602: error: Argument 1 to "_expn2" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/special.py:1603: error: Argument 1 to "_expn1" has incompatible type "Array"; expected "int"  [arg-type]
+ jax/_src/scipy/signal.py:430: error: Argument 1 to "detrend" has incompatible type "Literal[True] | str"; expected "str"  [arg-type]
+ jax/experimental/rnn.py:245: error: Argument 1 to "custom_vjp" has incompatible type "Callable[[Array, Array, Array, Array, Array, int, int, int, float, bool, str | Precision | tuple[str, str] | tuple[Precision, Precision] | None], tuple[Array, Array, Array]]"; expected "Callable[..., Never]"  [arg-type]
+ jax/_src/pallas/pallas_call.py:421: error: Argument 1 to "_batch_block_mapping" has incompatible type "tuple[int | None, ...]"; expected "tuple[int, ...]"  [arg-type]
+ jax/_src/cudnn/fused_attention_stablehlo.py:747: error: Need type annotation for "output"  [var-annotated]
+ jax/experimental/pallas/ops/rms_norm.py:225: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/layer_norm.py:244: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/attention.py:149: error: Argument 1 to "custom_vjp" has incompatible type "list[int]"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:203: error: Argument 1 to "custom_vjp" has incompatible type "range"; expected "tuple[int, ...]"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1088: error: Argument 1 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1089: error: Argument 2 to "_flash_attention_dkv_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1432: error: Argument 4 to "_flash_attention_dq_kernel" has incompatible type "int | None"; expected "int"  [arg-type]
+ jax/experimental/pallas/ops/tpu/flash_attention.py:1568: error: Need type annotation for "res"  [var-annotated]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/workflow_job.py: note: In member "try_make_job" of class "WorkflowJob":
+ cwltool/workflow_job.py:616:57: error: Argument 3 to "receive_output" of "WorkflowJob" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/command_line_tool.py: note: In member "job" of class "CommandLineTool":
+ cwltool/command_line_tool.py:960:52: error: Argument 1 to "update_status_output_callback" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]
+ cwltool/workflow.py: note: In member "job" of class "WorkflowStep":
+ cwltool/workflow.py:463:56: error: Argument 1 to "receive_output" of "WorkflowStep" has incompatible type "OutputCallbackType | None"; expected "OutputCallbackType"  [arg-type]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:56:37: error: Unexpected keyword argument "handler"  [call-arg]
+ aiohttp/web_app.py:56:37: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info

ibis (https://github.com/ibis-project/ibis)
+ ibis/expr/operations/tests/test_generic.py:147: error: Too many arguments for "Literal"  [call-arg]
+ ibis/expr/operations/tests/test_generic.py:147: error: Unexpected keyword argument "name" for "Literal"  [call-arg]
+ ibis/expr/operations/generic.py:147: note: "Literal" defined here
+ ibis/expr/operations/tests/test_generic.py:147: error: "Literal" gets multiple values for keyword argument "dtype"  [misc]
+ ibis/backends/sql/datatypes.py:31: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:48: error: Argument 1 to "Map" has incompatible type "String"; expected "bool"  [arg-type]
+ ibis/backends/sql/datatypes.py:66: error: Argument 1 to "Array" has incompatible type "String"; expected "bool"  [arg-type]

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/driving.py: note: In function "bounce":
+ src/bokeh/driving.py:97:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:97:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:97:36: note:     __next__
+ src/bokeh/driving.py: note: In function "cosine":
+ src/bokeh/driving.py:116:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:116:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:116:36: note:     __next__
+ src/bokeh/driving.py: note: In function "count":
+ src/bokeh/driving.py:122:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:122:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:122:36: note:     __next__
+ src/bokeh/driving.py: note: In function "linear":
+ src/bokeh/driving.py:154:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:154:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:154:36: note:     __next__
+ src/bokeh/driving.py: note: In function "repeat":
+ src/bokeh/driving.py:172:36: error: Argument 1 to "force" has incompatible type "Iterable[int]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:172:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:172:36: note:     __next__
+ src/bokeh/driving.py: note: In function "sine":
+ src/bokeh/driving.py:191:36: error: Argument 1 to "force" has incompatible type "Iterable[float]"; expected "Iterator[Any]"  [arg-type]
+ src/bokeh/driving.py:191:36: note: "Iterable" is missing following "Iterator" protocol member:
+ src/bokeh/driving.py:191:36: note:     __next__

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/wrapper/_implementations.py:58: error: Too few arguments for "run" of "Context"  [call-arg]

github-actions[bot] avatar Mar 01 '24 20:03 github-actions[bot]

Hey folks, this looks amazing, but when are you planning to release the change to mypy?

kevxwan-zv avatar Apr 16 '24 03:04 kevxwan-zv