Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[just testing mypy-primer] union return types #7416

Closed

Conversation

not-my-profile
Copy link
Contributor

No description provided.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2022

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

xarray (https://github.com/pydata/xarray)
+ ./xarray/core/utils.py:664: 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: 0.931
+ ./xarray/core/utils.py:664: : note: use --pdb to drop into pdb
- xarray/core/dataset.py:7818: error: Incompatible types in assignment (expression has type "Mapping[Hashable, int]", variable has type "Tuple[str]")  [assignment]
- xarray/core/dataset.py:7820: error: Incompatible types in assignment (expression has type "Union[Hashable, Iterable[Hashable], Any]", variable has type "Tuple[str]")  [assignment]
- xarray/core/dataset.py:7822: error: Argument 1 to "set" has incompatible type "Mapping[Hashable, int]"; expected "Iterable[Optional[str]]"  [arg-type]
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

jax (https://github.com/google/jax)
+ jax/_src/profiler.py:261: 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: 0.931
+ jax/_src/profiler.py:261: : note: use --pdb to drop into pdb
- jax/_src/numpy/ndarray.py:295: error: Cannot determine type of "_SDA_BASE_CLASS"  [has-type]
- jax/interpreters/xla.py:100: error: Need type annotation for "tracebacks" (hint: "tracebacks: Dict[<type>, <type>] = ...")  [var-annotated]
- jax/interpreters/partial_eval.py:1632: error: Argument 3 to "DebugInfo" has incompatible type "Callable[[List[int]], str]"; expected "Callable[[int], str]"  [arg-type]
- jax/_src/nn/functions.py:374: error: Argument 1 to "index" has incompatible type "Union[int, Hashable]"; expected "SupportsIndex"  [arg-type]
- jax/experimental/host_callback.py:967: error: Variable "jax.experimental.host_callback.XlaOp" is not valid as a type  [valid-type]
- jax/experimental/host_callback.py:967: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- jax/experimental/host_callback.py:1764: error: Variable "jax.experimental.host_callback.XlaLocalClient" is not valid as a type  [valid-type]
- jax/experimental/host_callback.py:1764: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- jax/experimental/host_callback.py:1765: error: Variable "jax.experimental.host_callback.XlaDevice" is not valid as a type  [valid-type]
- jax/experimental/host_callback.py:1765: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- jax/experimental/jax2tf/shape_poly.py:819: error: Argument 1 to "int" has incompatible type "Optional[int]"; expected "Union[str, bytes, SupportsInt, SupportsIndex, SupportsTrunc]"  [arg-type]
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/helpconfig.py:107: 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: 0.931
+ src/_pytest/helpconfig.py:107: : note: use --pdb to drop into pdb
+ src/_pytest/config/__init__.py:388: error: Incompatible types in assignment (expression has type "Union[BinaryIO, TextIO]", variable has type "IO[str]")  [assignment]
- testing/test_assertion.py:993: error: No overload variant matches argument type "bool"  [call-overload]
- testing/test_assertion.py:993: note: Possible overload variants:
- testing/test_assertion.py:993: note:     def [_C <: type] attrs(maybe_cls: _C, these: Optional[Dict[str, Any]] = ..., repr_ns: Optional[str] = ..., repr: bool = ..., cmp: Optional[bool] = ..., hash: Optional[bool] = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: Optional[bool] = ..., order: Optional[bool] = ...) -> _C
- testing/test_assertion.py:993: note:     def attrs(maybe_cls: None = ..., these: Optional[Dict[str, Any]] = ..., repr_ns: Optional[str] = ..., repr: bool = ..., cmp: Optional[bool] = ..., hash: Optional[bool] = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: Optional[bool] = ..., order: Optional[bool] = ...) -> Callable[[_C], _C]
- testing/test_assertion.py:1009: error: Module has no attribute "define"  [attr-defined]
- testing/test_assertion.py:1016: error: Too many arguments for "SimpleDataObject"  [call-arg]
- testing/test_assertion.py:1017: error: Too many arguments for "SimpleDataObject"  [call-arg]
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

flake8 (https://github.com/pycqa/flake8)
+ src/flake8/formatting/base.py:85: 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: 0.931
+ src/flake8/formatting/base.py:85: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

zulip (https://github.com/zulip/zulip)
- Warning: unused section(s) in pyproject.toml: module = ['coverage.*', 'natsort.*', 'netifaces.*', 'pyinotify.*']
+ zproject/email_backends.py:31: 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: 0.931
+ zproject/email_backends.py:31: : note: use --pdb to drop into pdb
- zerver/lib/queue.py:218: error: Unused "type: ignore" comment
- zerver/lib/queue.py:234: error: Unused "type: ignore" comment
- zerver/lib/upload.py:162: error: Unused "type: ignore" comment
- zerver/lib/send_email.py:298: error: Unused "type: ignore" comment
- zerver/views/video_calls.py:246: error: Unused "type: ignore" comment
- corporate/tests/test_stripe.py:194: error: Unused "type: ignore" comment
- corporate/tests/test_stripe.py:2709: error: Unused "type: ignore" comment
- corporate/tests/test_stripe.py:2710: error: Unused "type: ignore" comment
- zproject/jinja2/__init__.py:33: error: Unused "type: ignore" comment
- zerver/tests/test_outgoing_http.py:28: error: Unused "type: ignore" comment
- zerver/tests/test_outgoing_http.py:44: error: Unused "type: ignore" comment
- zerver/tests/test_middleware.py:74: error: <nothing> has no attribute "get"  [attr-defined]
- zerver/tests/test_middleware.py:79: error: <nothing> has no attribute "get"  [attr-defined]
- zerver/tests/test_middleware.py:203: error: <nothing> has no attribute "get"  [attr-defined]
- zerver/tests/test_middleware.py:220: error: <nothing> has no attribute "get"  [attr-defined]
- zerver/tests/test_middleware.py:230: error: <nothing> has no attribute "get"  [attr-defined]
- tools/lib/provision_inner.py:27: error: Unused "type: ignore" comment
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

urllib3 (https://github.com/urllib3/urllib3)
+ /tmp/mypy_primer/projects/_urllib3_venv/lib/python3.10/site-packages/_pytest/helpconfig.py:107: 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: 0.931
- test/tz_stub.py:10: error: Unused "type: ignore" comment
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

dulwich (https://github.com/dulwich/dulwich)
+ dulwich/ignore.py:246: 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: 0.931
+ dulwich/ignore.py:246: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

rich (https://github.com/willmcgugan/rich)
+ /tmp/mypy_primer/projects/rich/rich/markdown.py:603: 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: 0.931
- rich/live.py:172: error: Subclass of "TextIO" and "FileProxy" cannot exist: would have incompatible method signatures
- rich/live.py:175: error: Subclass of "TextIO" and "FileProxy" cannot exist: would have incompatible method signatures
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

vision (https://github.com/pytorch/vision)
+ torchvision/prototype/features/_encoded.py:27: 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: 0.931
+ torchvision/prototype/features/_encoded.py:27: : note: use --pdb to drop into pdb
- torchvision/prototype/transforms/_geometry.py:124: error: Unused "type: ignore" comment
- torchvision/prototype/transforms/_geometry.py:125: error: Unused "type: ignore" comment
- torchvision/prototype/transforms/_augment.py:66: error: Unused "type: ignore" comment
- torchvision/prototype/transforms/_augment.py:67: error: Unused "type: ignore" comment
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1597, in check_overload_call
+   File "mypy/checkexpr.py", line 1868, in union_overload_result
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/computation/ops.py:583: error: Cannot call function of unknown type  [operator]
- pandas/core/indexes/base.py:4091: error: Argument 1 has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsDunderLE, _SupportsDunderGE, _SupportsDunderGT, _SupportsDunderLT]"  [arg-type]
- pandas/core/indexes/base.py:4091: error: Argument 2 has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsDunderLE, _SupportsDunderGE, _SupportsDunderGT, _SupportsDunderLT]"  [arg-type]
- pandas/io/parsers/base_parser.py:1038: error: Incompatible types in assignment (expression has type "defaultdict[str, Union[ExtensionDtype, str, dtype[Any], Type[object], Dict[Hashable, Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]]]]]", variable has type "Optional[Union[Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]], Dict[Hashable, Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]]]]]")  [assignment]
- pandas/io/parsers/base_parser.py:1039: error: Unused "type: ignore[arg-type, return-value]" comment
- pandas/io/parsers/base_parser.py:1060: error: Value of type "Optional[Union[Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]], Dict[Hashable, Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]]]]]" is not indexable  [index]
- pandas/io/parsers/base_parser.py:1067: error: Value of type "Optional[Union[Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]], Dict[Hashable, Union[ExtensionDtype, Union[str, dtype[Any], Type[str], Type[float], Type[int], Type[complex], Type[bool], Type[object]]]]]]" is not indexable  [index]
- pandas/core/generic.py:1482: error: Argument 1 to "inv" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsInversion[ndarray[Any, dtype[bool_]]]"  [arg-type]
- pandas/core/generic.py:1484: error: Argument 1 to "neg" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsNeg[ndarray[Any, dtype[Any]]]"  [arg-type]
- pandas/core/generic.py:1496: error: Argument 1 to "pos" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsPos[ndarray[Any, dtype[Any]]]"  [arg-type]
- pandas/io/formats/style.py:3848: error: Argument 2 to "ge" has incompatible type "Union[str, float, Period, Timedelta, Interval[Any], datetime64, timedelta64, datetime, Sequence[Any], ndarray[Any, Any], NDFrame]"; expected "Union[_SupportsDunderLE, _SupportsDunderGE, _SupportsDunderGT, _SupportsDunderLT]"  [arg-type]
- pandas/io/formats/style.py:3855: error: Argument 2 to "le" has incompatible type "Union[str, float, Period, Timedelta, Interval[Any], datetime64, timedelta64, datetime, Sequence[Any], ndarray[Any, Any], NDFrame]"; expected "Union[_SupportsDunderLE, _SupportsDunderGE, _SupportsDunderGT, _SupportsDunderLT]"  [arg-type]
+ /tmp/mypy_primer/projects/_pandas_venv/lib/python3.10/site-packages/_pytest/helpconfig.py:107: 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: 0.931
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

poetry (https://github.com/python-poetry/poetry)
+ /tmp/mypy_primer/projects/_poetry_venv/lib/python3.10/site-packages/pip/_vendor/certifi/core.py:64: 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: 0.931
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/data/history/jsondatahandler.py:26: error: Signature of "ohlcv_get_available_data" incompatible with supertype "IDataHandler"
- freqtrade/data/history/jsondatahandler.py:38: error: Signature of "ohlcv_get_pairs" incompatible with supertype "IDataHandler"
- freqtrade/data/history/jsondatahandler.py:126: error: Signature of "trades_get_pairs" incompatible with supertype "IDataHandler"
- freqtrade/data/history/hdf5datahandler.py:24: error: Signature of "ohlcv_get_available_data" incompatible with supertype "IDataHandler"
- freqtrade/data/history/hdf5datahandler.py:36: error: Signature of "ohlcv_get_pairs" incompatible with supertype "IDataHandler"
- freqtrade/data/history/hdf5datahandler.py:111: error: Signature of "trades_get_pairs" incompatible with supertype "IDataHandler"
+ freqtrade/misc.py:260: 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: 0.931
+ freqtrade/misc.py:260: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/locale/__init__.py: note: In member "__radd__" of class "_TranslationProxy":
- sphinx/locale/__init__.py:70:5: error: Argument 1 of "__radd__" is incompatible with supertype "UserString"; supertype defines the argument type as "object"
- sphinx/locale/__init__.py:70:5: note: This violates the Liskov substitution principle
- sphinx/locale/__init__.py:70:5: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
- sphinx/locale/__init__.py:70:5: error: Return type "str" of "__radd__" incompatible with return type "_TranslationProxy" in supertype "UserString"
- sphinx/locale/__init__.py: note: In member "__rmod__" of class "_TranslationProxy":
- sphinx/locale/__init__.py:76:5: error: Return type "str" of "__rmod__" incompatible with return type "_TranslationProxy" in supertype "UserString"
- sphinx/locale/__init__.py: note: In member "__rmul__" of class "_TranslationProxy":
- sphinx/locale/__init__.py:82:5: error: Return type "str" of "__rmul__" incompatible with return type "_TranslationProxy" in supertype "UserString"
- sphinx/domains/python.py:1477: error: Unused "type: ignore" comment
+ sphinx/testing/path.py:157: 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: 0.931
+ sphinx/testing/path.py:157: : note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+   File "mypy/checkexpr.py", line 3962, in accept
+   File "mypy/nodes.py", line 1713, in accept
+   File "mypy/checkexpr.py", line 288, in visit_call_expr
+   File "mypy/checkexpr.py", line 371, in visit_call_expr_inner
+   File "mypy/checkexpr.py", line 878, in check_call_expr_with_callee_type
+   File "mypy/checkexpr.py", line 942, in check_call
+   File "mypy/checkexpr.py", line 1620, in check_overload_call
+   File "mypy/checkexpr.py", line 1762, in infer_overload_return_type
+   File "mypy/checkexpr.py", line 938, in check_call
+   File "mypy/checkexpr.py", line 1068, in check_callable_call
+   File "mypy/checkexpr.py", line 749, in apply_function_plugin
+   File "mypy/plugins/default.py", line 134, in open_callback
+   File "mypy/plugins/default.py", line 176, in _analyze_open_signature
+ AssertionError: 

cwltool (https://github.com/common-workflow-language/cwltool)
- Warning: unused section(s) in mypy.ini: [mypy-schema_salad.tests.*], [mypy-past.builtins.*]
+ cwltool/run_job.py:59: 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: 0.931
+ cwltool/run_job.py:59: : note: use --pdb to drop into pdb
- cwltool/update.py: note: In function "v1_0to1_1":
- cwltool/update.py:92:13: error: Returning Any from function declared to return "Union[MutableSequence[MutableMapping[str, str]], MutableMapping[str, str]]"  [no-any-return]
- cwltool/update.py:94:13: error: Returning Any from function declared to return "Union[MutableSequence[MutableMapping[str, str]], MutableMapping[str, str]]"  [no-any-return]
- cwltool/update.py:100:13: error: Returning Any from function declared to return "Union[MutableSequence[MutableMapping[str, str]], MutableMapping[str, str]]"  [no-any-return]
- cwltool/update.py:102:13: error: Returning Any from function declared to return "Union[MutableSequence[MutableMapping[str, str]], MutableMapping[str, str]]"  [no-any-return]
- cwltool/process.py:646: error: Unused "type: ignore" comment
- cwltool/command_line_tool.py: note: In member "collect_output" of class "CommandLineTool":
- cwltool/command_line_tool.py:1381:37: error: Redundant cast to "Callable[[str, str], int]"  [redundant-cast]
- tests/test_pathmapper.py:67:2: error: Untyped decorator makes function "test_normalizeFilesDirs" untyped  [misc]
- tests/test_pathmapper.py:85:2: error: Untyped decorator makes function "test_basename_field_generation" untyped  [misc]
- tests/test_anon_types.py:115:2: error: Untyped decorator makes function "test_anon_types" untyped  [misc]
- cwltool/pack.py: note: In function "pack":
- cwltool/pack.py:323:5: error: Returning Any from function declared to return "MutableMapping[str, Union[bool, str, int, float, MutableSequence[Union[None, bool, str, int, float, MutableSequence[Union[None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]]], MutableMapping[str, Union[None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]]]]], MutableMapping[str, Union[None, bool, str, int, float, MutableSequence[Union[None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]]], MutableMapping[str, Union[None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]]]]], None]]"  [no-any-return]
- cwltool/main.py: note: In function "generate_input_template":
- cwltool/main.py:337:5: error: Returning Any from function declared to return "MutableMapping[str, Union[bool, str, int, float, MutableSequence[Union[None, bool, str, int, float, MutableSequence[Union[None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]]], MutableMapping[str, Un```

@JelleZijlstra
Copy link
Member

I think mypy 0.931 still has a custom plugin for open(), so the typeshed signature doesn't actually affect it. But the new mypy release should drop that plugin. I don't know why your changes makes the plugin crash, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants