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

narrow on initial assignment #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

narrow on initial assignment #4

wants to merge 2 commits into from

Conversation

hauntsaninja
Copy link
Owner

No description provided.

This comment has been minimized.

@hauntsaninja
Copy link
Owner Author

if the type annotation is Any we should listen
if the expression is Any we shouldn't narrow (for warn return any reason)

This comment has been minimized.

This comment has been minimized.

Copy link

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

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/libclinic/clanguage.py:292: error: Non-overlapping equality check (left operand type: "int", right operand type: "Literal[Sentinels.unspecified]")  [comparison-overlap]

arviz (https://github.com/arviz-devs/arviz)
+ arviz/stats/stats.py:436: error: Unexpected keyword argument "scale"  [call-arg]
+ arviz/stats/stats.py:1553: note: Called function defined here

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/tasks.py:1537: error: Argument "validated_state" to "emit_task_run_state_change_event" has incompatible type "State[Any] | None"; expected "State[Any]"  [arg-type]
- src/prefect/engine.py:61: error: Argument "error_logger" to "run_flow" has incompatible type "LoggerAdapter[Logger]"; expected "Logger | None"  [arg-type]
+ src/prefect/engine.py:61: error: Argument "error_logger" to "run_flow" has incompatible type "PrefectLogAdapter"; expected "Logger | None"  [arg-type]
- src/prefect/engine.py:63: error: Argument "error_logger" to "run_flow" has incompatible type "LoggerAdapter[Logger]"; expected "Logger | None"  [arg-type]
+ src/prefect/engine.py:63: error: Argument "error_logger" to "run_flow" has incompatible type "PrefectLogAdapter"; expected "Logger | None"  [arg-type]

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_typing_extra.py:382: error: Argument 2 to <tuple> has incompatible type "type[typing.ParamSpec]"; expected "type[typing_extensions.ParamSpec]"  [arg-type]
+ pydantic/_internal/_typing_extra.py:382: error: Incompatible types in assignment (expression has type "tuple[type[typing_extensions.ParamSpec], type[typing.ParamSpec]]", variable has type "tuple[type[typing_extensions.ParamSpec], ...]")  [assignment]
+ pydantic/_internal/_typing_extra.py:715: error: Incompatible types in assignment (expression has type "tuple[Any, bool]", target has type "Never")  [assignment]
+ pydantic/_internal/_typing_extra.py:717: error: Incompatible types in assignment (expression has type "tuple[Any, bool]", target has type "Never")  [assignment]
+ pydantic/_internal/_typing_extra.py:719: error: Incompatible types in assignment (expression has type "tuple[Any, bool]", target has type "Never")  [assignment]

psycopg (https://github.com/psycopg/psycopg)
+ tests/test_connection_async.py:729: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection_async.py:732: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection_async.py:733: error: "object" has no attribute "name"  [attr-defined]
+ tests/test_connection_async.py:736: error: "object" has no attribute "guc"  [attr-defined]
+ tests/test_connection_async.py:744: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection_async.py:747: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection_async.py:748: error: "object" has no attribute "name"  [attr-defined]
+ tests/test_connection_async.py:752: error: "object" has no attribute "guc"  [attr-defined]
+ tests/test_connection.py:727: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection.py:730: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection.py:731: error: "object" has no attribute "name"  [attr-defined]
+ tests/test_connection.py:734: error: "object" has no attribute "guc"  [attr-defined]
+ tests/test_connection.py:742: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection.py:745: error: "object" has no attribute "values"  [attr-defined]
+ tests/test_connection.py:746: error: "object" has no attribute "name"  [attr-defined]
+ tests/test_connection.py:749: error: "object" has no attribute "guc"  [attr-defined]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/update.py: note: In function "update":
+ cwltool/update.py:362:36: error: Function "nextupdate" could always be true in boolean context  [truthy-function]
+ cwltool/subgraph.py: note: In function "get_process":
+ cwltool/subgraph.py:267:19: error: Incompatible types in assignment (expression has type "int | float | MutableSequence[CWLOutputType] | MutableMapping[str, CWLOutputType] | None", variable has type "CommentedMap | CommentedSeq | str | None")  [assignment]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/generic.py:3523: error: Argument 1 to "__call__" of "EngFormatter" has incompatible type "float | complex"; expected "float"  [arg-type]
+ pandas/core/reshape/reshape.py:971: error: Cannot determine type of "__add__"  [has-type]
+ pandas/core/reshape/reshape.py:971: note: Left operand is of type "list[Any] | FrozenList"

bidict (https://github.com/jab/bidict)
+ bidict/_base.py: note: In member "inverse" of class "BidictBase":
+ bidict/_base.py:187:13: error: Returning Any from function declared to return "BidictBase[VT, KT]"  [no-any-return]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/misc.py:136: error: Unused "type: ignore" comment  [unused-ignore]

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/internal/coverage/instrumentation_py3_12.py:104: error: Incompatible types in assignment (expression has type "tuple[str | None, tuple[str, ...]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:104: error: Incompatible types in assignment (expression has type "tuple[None, tuple[str, ...]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
- ddtrace/internal/coverage/instrumentation_py3_12.py:106: error: List item 0 has incompatible type "str | None"; expected "str"  [list-item]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:106: error: List item 0 has incompatible type "None"; expected "str"  [list-item]
- ddtrace/internal/coverage/instrumentation_py3_12.py:109: error: Incompatible types in assignment (expression has type "tuple[str | None, tuple[str | None]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
- ddtrace/internal/coverage/instrumentation_py3_12.py:117: error: Incompatible types in assignment (expression has type "tuple[str | None, tuple[str, ...]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:109: error: Incompatible types in assignment (expression has type "tuple[None, tuple[None]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:117: error: Incompatible types in assignment (expression has type "tuple[None, tuple[str, ...]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
- ddtrace/internal/coverage/instrumentation_py3_12.py:122: error: Incompatible types in assignment (expression has type "tuple[str | None, tuple[str]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:122: error: Incompatible types in assignment (expression has type "tuple[None, tuple[str]]", target has type "tuple[str, tuple[str, ...] | None]")  [assignment]
+ ddtrace/appsec/_iast/_taint_tracking/aspects.py:779: error: Incompatible types in assignment (expression has type "list[bytes | str] | list[str] | list[bytes] | list[bytearray]", variable has type "list[str | bytes | bytearray | None]")  [assignment]

spark (https://github.com/apache/spark)
+ python/pyspark/streaming/dstream.py:916: error: Too many arguments  [call-arg]
+ python/pyspark/ml/pipeline.py:440: error: Need type annotation for "stages" (hint: "stages: list[<type>] = ...")  [var-annotated]
+ python/pyspark/ml/tuning.py:259: error: "Never" has no attribute "_transfer_param_map_from_java"  [attr-defined]
+ python/pyspark/ml/tuning.py:441: error: "Never" has no attribute "uid"  [attr-defined]

xarray (https://github.com/pydata/xarray)
+ xarray/core/indexing.py: note: In function "group_indexers_by_index":
+ xarray/core/indexing.py:161: error: Invalid index type "None" for "dict[int, Any | Index]"; expected type "int"  [index]
+ xarray/core/variable.py:157: error: "Never" has no attribute "ndim"  [attr-defined]
+ xarray/core/variable.py:159: error: "Never" has no attribute "ndim"  [attr-defined]
+ xarray/core/alignment.py: note: In member "_normalize_indexes" of class "Aligner":
+ xarray/core/alignment.py:209: error: "Never" has no attribute "dtype"  [attr-defined]
+ xarray/plot/dataarray_plot.py: note: In function "_add_labels":
+ xarray/plot/dataarray_plot.py:1108: error: Argument "axis" to "_set_concise_date" has incompatible type "str"; expected "Literal['x', 'y', 'z']"  [arg-type]
+ xarray/tests/test_variable.py: note: In member "test_tz_datetime" of class "TestAsCompatibleData":
+ xarray/tests/test_variable.py:2688: error: "Never" has no attribute "array"  [attr-defined]
+ xarray/tests/test_variable.py: note: At top level:
+ xarray/tests/test_variable.py: note: In member "test_tz_datetime" of class "TestAsCompatibleData":
+ xarray/tests/test_variable.py:2689: error: "Never" has no attribute "array"  [attr-defined]
+ xarray/tests/test_variable.py:2689: note: Error code "attr-defined" not covered by "type: ignore" comment
+ xarray/tests/test_variable.py:2697: error: "Never" has no attribute "dtype"  [attr-defined]

pylint (https://github.com/pycqa/pylint)
+ pylint/checkers/utils.py:1339: error: Returning Any from function declared to return "str | None"  [no-any-return]
+ pylint/checkers/classes/class_checker.py:255: error: Call to untyped function (unknown) in typed context  [no-untyped-call]

mypy (https://github.com/python/mypy)
+ mypy/types.py:2218: error: List item 0 has incompatible type "Optional[str]"; expected "None"  [list-item]
+ mypy/types.py:2218: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-list-item for more info
+ mypy/types.py:3731: error: Need type annotation for "old_index"  [var-annotated]
+ mypy/types.py:3731: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
+ mypy/semanal.py:6779: error: Argument 2 to "isinstance" has incompatible type "object"; expected "_ClassInfo"  [arg-type]
+ mypy/semanal.py:6780: error: "object" has no attribute "type"  [attr-defined]
+ mypy/semanal.py:6792: error: "object" has no attribute "type"  [attr-defined]
+ mypy/plugins/attrs.py:767: error: Redundant call to get_proper_type()  [misc]
+ mypy/test/testfinegrained.py:319: error: Unsupported left operand type for + ("object")  [operator]
+ mypy/test/testfinegrained.py:319: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-operator for more info
+ mypy/test/testfinegrained.py:322: error: Item "object" of "Union[object, Any]" has no attribute "replace"  [union-attr]
+ mypy/test/testfinegrained.py:322: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-union-attr for more info
+ mypy/test/testfinegrained.py:325: error: Item "object" of "Union[object, Any]" has no attribute "strip"  [union-attr]
+ mypy/test/testfinegrained.py:357: error: Unsupported left operand type for + ("object")  [operator]
+ mypy/test/testfinegrained.py:358: error: Item "object" of "Union[object, Any]" has no attribute "strip"  [union-attr]

beartype (https://github.com/beartype/beartype)
+ beartype/door/_func/infer/kind/infercallable.py:444: error: Unused "type: ignore" comment  [unused-ignore]
+ beartype/door/_func/infer/kind/infercallable.py:480: error: Unused "type: ignore" comment  [unused-ignore]
+ beartype/door/_func/infer/kind/infercallable.py:512: error: Unused "type: ignore" comment  [unused-ignore]
+ beartype/claw/_package/clawpkgtrie.py:497: error: Unused "type: ignore" comment  [unused-ignore]
+ beartype/claw/_package/clawpkgtrie.py:699: error: Unused "type: ignore" comment  [unused-ignore]

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/structured_configs/_implementations.py:2278: error: "Sequence[str | Builds[Any]]" has no attribute "append"  [attr-defined]
- src/hydra_zen/structured_configs/_implementations.py:2288: error: "Sequence[str | Builds[Any]]" has no attribute "append"  [attr-defined]
- src/hydra_zen/structured_configs/_implementations.py:2291: error: "Sequence[str | Builds[Any]]" has no attribute "append"  [attr-defined]
- src/hydra_zen/structured_configs/_implementations.py:2298: error: "Sequence[str | Builds[Any]]" has no attribute "append"  [attr-defined]
- src/hydra_zen/wrapper/_implementations.py:445: error: Argument 3 has incompatible type "**dict[str, DictConfig]"; expected "P.kwargs"  [arg-type]
- src/hydra_zen/wrapper/_implementations.py:446: error: Unused "type: ignore" comment  [unused-ignore]

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/config/argparsing.py:468: error: Returning Any from function declared to return "str"  [no-any-return]
+ src/_pytest/_code/code.py:1079: error: Argument 1 to "from_exception" of "ExceptionInfo" has incompatible type "Optional[BaseException]"; expected "BaseException"  [arg-type]
+ src/_pytest/_code/code.py:1079: error: Item "None" of "Optional[BaseException]" has no attribute "__traceback__"  [union-attr]
+ src/_pytest/_code/code.py:1085: error: Argument 1 to "from_exception" of "ExceptionInfo" has incompatible type "Optional[BaseException]"; expected "BaseException"  [arg-type]
+ src/_pytest/_code/code.py:1085: error: Item "None" of "Optional[BaseException]" has no attribute "__traceback__"  [union-attr]
+ src/_pytest/config/__init__.py:1136: error: Returning Any from function declared to return "TerminalWriter"  [no-any-return]
+ src/_pytest/nodes.py:492: error: Returning Any from function declared to return "tuple[Union[str, Path], Optional[int]]"  [no-any-return]
+ src/_pytest/python.py:728: error: Returning Any from function declared to return "Optional[object]"  [no-any-return]
+ src/_pytest/python.py:841: error: Returning Any from function declared to return "bool"  [no-any-return]
+ src/_pytest/python.py:848: error: Returning Any from function declared to return "bool"  [no-any-return]
+ testing/test_reports.py:310: error: Incompatible types in assignment (expression has type "CollectReport", variable has type "TestReport")  [assignment]
+ testing/test_python_path.py:128: error: Statement is unreachable  [unreachable]
+ testing/test_compat.py:151: error: Statement is unreachable  [unreachable]
+ testing/test_compat.py:152: error: Unused "type: ignore" comment  [unused-ignore]
+ testing/test_compat.py:156: error: Statement is unreachable  [unreachable]
+ testing/test_compat.py:186: error: Statement is unreachable  [unreachable]
+ testing/test_compat.py:187: error: Unused "type: ignore" comment  [unused-ignore]
+ testing/test_compat.py:191: error: Statement is unreachable  [unreachable]

sympy (https://github.com/sympy/sympy)
+ sympy/codegen/ast.py:853: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:897: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:950: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1019: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1154: error: Cannot determine type of "_fields"  [has-type]
+ sympy/codegen/ast.py:1237: error: Cannot determine type of "_fields"  [has-type]
+ sympy/codegen/ast.py:1393: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1461: error: Cannot determine type of "_fields"  [has-type]
+ sympy/codegen/ast.py:1602: error: Incompatible types in assignment (expression has type "tuple[str, str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1633: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1664: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1685: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1717: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1743: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1777: error: Incompatible types in assignment (expression has type "tuple[str, ...]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1831: error: Cannot determine type of "_fields"  [has-type]
+ sympy/codegen/ast.py:1866: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1889: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1897: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/ast.py:1905: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/pynodes.py:11: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:49: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:70: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:96: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:121: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:153: error: Cannot determine type of "_fields"  [has-type]
+ sympy/codegen/fnodes.py:176: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:208: error: Incompatible types in assignment (expression has type "tuple[str, str, str, str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:233: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:252: error: Incompatible types in assignment (expression has type "tuple[str, str, str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:550: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:577: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:647: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/fnodes.py:654: error: Incompatible types in assignment (expression has type "tuple[str, str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/cnodes.py:61: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/cnodes.py:75: error: Incompatible types in assignment (expression has type "tuple[str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/cnodes.py:145: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/integrals/manualintegrate.py:1568: error: Unused "type: ignore" comment  [unused-ignore]
+ sympy/codegen/numpy_nodes.py:127: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/numpy_nodes.py:143: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/matrix_nodes.py:60: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]
+ sympy/codegen/cxxnodes.py:9: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "Token" defined the type as "tuple[()]")  [assignment]

rich (https://github.com/Textualize/rich)
+ rich/_fileno.py:18: error: Returning Any from function declared to return "int | None"  [no-any-return]
+ rich/measure.py:115: error: Returning Any from function declared to return "Measurement"  [no-any-return]

freqtrade (https://github.com/freqtrade/freqtrade)
+ freqtrade/optimize/backtesting.py:1593: error: Argument "data" to "handle_left_open" of "Backtesting" has incompatible type "dict[str, tuple[Any, ...]]"; expected "dict[str, list[tuple[Any, ...]]]"  [arg-type]

schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/jsonld_context.py: note: In function "process_type":
+ schema_salad/jsonld_context.py:132:34: error: Value of type "str | None" is not indexable  [index]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/aglib/elf.py: note: In function "get_ehdr":
+ pwndbg/aglib/elf.py:340: error: Incompatible return value type (got "tuple[int, <typing special form>]", expected "tuple[int | None, Elf32_Ehdr | Elf64_Ehdr | None]")  [return-value]

trio (https://github.com/python-trio/trio)
+ src/trio/testing/_fake_net.py:99: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:888: error: "Never" has no attribute "cancel"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:1299: error: "Never" has no attribute "run_sync_soon"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2323: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:2323: error: "Never" has no attribute "coro"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2323: note: Error code "attr-defined" not covered by "type: ignore" comment
+ src/trio/_core/_tests/test_run.py:2326: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:2326: error: "Never" has no attribute "coro"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2326: note: Error code "attr-defined" not covered by "type: ignore" comment
+ src/trio/_core/_tests/test_run.py:2392: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:2392: error: "Never" has no attribute "coro"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2392: note: Error code "attr-defined" not covered by "type: ignore" comment
+ src/trio/_core/_tests/test_run.py:2393: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:2393: error: "Never" has no attribute "coro"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2393: note: Error code "attr-defined" not covered by "type: ignore" comment
+ src/trio/_core/_tests/test_run.py:2394: error: Unused "type: ignore" comment  [unused-ignore]
+ src/trio/_core/_tests/test_run.py:2394: error: "Never" has no attribute "coro"  [attr-defined]
+ src/trio/_core/_tests/test_run.py:2394: note: Error code "attr-defined" not covered by "type: ignore" comment
+ src/trio/_core/_tests/test_run.py:2425: error: Unused "type: ignore" comment  [unused-ignore]

discord.py (https://github.com/Rapptz/discord.py)
- discord/scheduled_event.py:495: error: Incompatible types in assignment (expression has type "str | None", target has type "str")  [assignment]
- discord/appinfo.py:353: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/appinfo.py:356: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/appinfo.py:359: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/appinfo.py:361: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/invite.py:466: error: Item "Object" of "Guild | Object" has no attribute "get_channel"  [union-attr]
- discord/webhook/async_.py:565: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:569: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:571: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:575: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:577: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:581: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:583: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:586: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:590: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:592: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:594: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:611: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
- discord/webhook/async_.py:614: error: Unsupported target for indexed assignment ("dict[str, Any] | None")  [index]
+ discord/ext/commands/cog.py:371: error: Argument 1 to "append" of "list" has incompatible type "Group | Command[Self, [VarArg(Any), KwArg(Any)], Any] | None"; expected "Group | Command[Self, [VarArg(Any), KwArg(Any)], Any]"  [arg-type]

tornado (https://github.com/tornadoweb/tornado)
+ tornado/options.py:580: error: No overload variant of "range" matches argument types "object", "int"  [call-overload]
+ tornado/options.py:580: note: Possible overload variants:
+ tornado/options.py:580: note:     def __new__(cls, SupportsIndex, /) -> range
+ tornado/options.py:580: note:     def __new__(cls, SupportsIndex, SupportsIndex, SupportsIndex = ..., /) -> range
+ tornado/options.py:580: error: Unsupported operand types for + ("object" and "int")  [operator]
+ tornado/http1connection.py:618: error: Redundant cast to "int"  [redundant-cast]

starlette (https://github.com/encode/starlette)
+ starlette/requests.py:187: error: Returning Any from function declared to return "URL"  [no-any-return]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/cookiejar.py:372:38: error: Incompatible types in assignment (expression has type "Morsel[str]", target has type "str | Morsel[Never]")  [assignment]
+ aiohttp/cookiejar.py:380:34: error: Incompatible types in assignment (expression has type "Morsel[str]", target has type "str | Morsel[Never]")  [assignment]
+ aiohttp/web_urldispatcher.py:950:9: error: Returning Any from function declared to return "StreamResponse"  [no-any-return]
+ aiohttp/web_urldispatcher.py:950:9: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-no-any-return for more info

jax (https://github.com/google/jax)
+ jax/_src/dtypes.py:149: error: Unused "type: ignore" comment  [unused-ignore]
+ jax/_src/dtypes.py:155: error: Unused "type: ignore" comment  [unused-ignore]
+ jax/_src/numpy/lax_numpy.py:12133: error: Argument 1 to "extend" of "list" has incompatible type "tuple[Any, ...] | None"; expected "Iterable[int]"  [arg-type]
+ jax/_src/numpy/lax_numpy.py:12134: error: Argument 1 to "extend" of "list" has incompatible type "tuple[Any, ...] | None"; expected "Iterable[int]"  [arg-type]
+ jax/_src/numpy/index_tricks.py:166: error: Argument 1 to "__iadd__" of "list" has incompatible type "list[int]"; expected "Iterable[str]"  [arg-type]
+ jax/_src/export/shape_poly.py:2137: error: Unused "type: ignore" comment  [unused-ignore]

poetry (https://github.com/python-poetry/poetry)
+ src/poetry/publishing/uploader.py:206: error: Argument 1 to "append" of "list" has incompatible type "tuple[str, tuple[str, BufferedReader, str]]"; expected "tuple[str, str]"  [arg-type]

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/test.py:1295: error: Cannot determine type of "headers"  [has-type]

scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ sklearn/ensemble/tests/test_forest.py:118: error: Argument 1 to "update" of "MutableMapping" has incompatible type "dict[str, type[ForestRegressor]]"; expected "SupportsKeysAndGetItem[str, type[ForestClassifier]]"  [arg-type]

dedupe (https://github.com/dedupeio/dedupe)
+ dedupe/branch_and_bound.py:82: error: Argument 1 to "append" of "list" has incompatible type "tuple[dict[Any, frozenset[int]], tuple[Predicate]]"; expected "tuple[dict[Predicate, frozenset[int]], tuple[()]]"  [arg-type]
+ dedupe/training.py:319: error: Argument 1 to "len" has incompatible type "frozenset[tuple[int, int] | tuple[str, str]] | InfiniteSet"; expected "Sized"  [arg-type]
+ dedupe/training.py:328: error: Incompatible return value type (got "dict[Predicate, frozenset[int] | InfiniteSet]", expected "dict[Predicate, frozenset[int]]")  [return-value]

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.

1 participant