pyright
pyright copied to clipboard
Explore the removal of `Sequence[str]` as a base class to `str`.
This relates to: https://github.com/python/typing/issues/256 https://github.com/python/mypy/issues/11001 https://github.com/microsoft/pyright/discussions/8222
Diff from mypy_primer, showing the effect of this PR on open source code:
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- "LazyTaintDict" is incompatible with "bytes" (reportReturnType)
+ "str" is incompatible with "bytes" (reportReturnType)
trio (https://github.com/python-trio/trio)
+ /tmp/mypy_primer/projects/trio/src/trio/_tests/test_subprocess.py:449:19 - error: No overloads for "open_process" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/trio/src/trio/_tests/test_subprocess.py:449:44 - error: Argument of type "Literal[False]" cannot be assigned to parameter "shell" of type "Literal[True]" in function "open_process"
+ "Literal[False]" is incompatible with type "Literal[True]" (reportArgumentType)
- 3753 errors, 53 warnings, 0 informations
+ 3755 errors, 53 warnings, 0 informations
spack (https://github.com/spack/spack)
+ /tmp/mypy_primer/projects/spack/lib/spack/llnl/util/filesystem.py:1891:9 - error: Method "__getitem__" overrides class "Sequence" in an incompatible manner
+ Return type mismatch: base method returns type "Sequence[Unknown]", override returns type "str | Unknown | FileList"
+ Type "str | Unknown | FileList" is incompatible with type "Sequence[Unknown]"
+ "str" is incompatible with "Sequence[Unknown]" (reportIncompatibleMethodOverride)
- "str" is incompatible with "Collection[int]"
+ "str" is incompatible with protocol "Collection[int]"
- Type parameter "_T_co@Collection" is covariant, but "str" is not a subtype of "int"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__iter__" is an incompatible type
+ Type "() -> Iterator[str]" is incompatible with type "() -> Iterator[_T_co@Collection]"
+ Function return type "Iterator[str]" is incompatible with type "Iterator[_T_co@Collection]"
+ "Iterator[str]" is incompatible with "Iterator[_T_co@Collection]"
- "str" is incompatible with "int" (reportArgumentType)
+ "__contains__" is an incompatible type (reportArgumentType)
+ /tmp/mypy_primer/projects/spack/lib/spack/spack/test/spec_dag.py:730:40 - error: Argument of type "str" cannot be assigned to parameter "key" of type "LiteralString" in function "__getitem__"
+ "str" is incompatible with "LiteralString" (reportArgumentType)
+ /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/babelstream/package.py:177:26 - error: Operator "-" not supported for types "set[LiteralString]" and "set[str]" (reportOperatorIssue)
- Operator "+" not supported for types "Literal['DCUDA_TOOLKIT_ROOT_DIR=']" and "None" when expected type is "str" (reportOperatorIssue)
+ Operator "+" not supported for types "Literal['DCUDA_TOOLKIT_ROOT_DIR=']" and "None" (reportOperatorIssue)
- Operator "+" not supported for types "Literal['-SDK_DIR=']" and "None" when expected type is "str" (reportOperatorIssue)
+ Operator "+" not supported for types "Literal['-SDK_DIR=']" and "None" (reportOperatorIssue)
- 22616 errors, 76 warnings, 0 informations
+ 22619 errors, 76 warnings, 0 informations
antidote (https://github.com/Finistere/antidote)
+ /tmp/mypy_primer/projects/antidote/tests/core/test_inject.py:140:21 - error: Argument of type "Literal['test']" cannot be assigned to parameter "args" of type "Sequence[object] | None" in function "__call__"
+ Type "Literal['test']" is incompatible with type "Sequence[object] | None"
+ "Literal['test']" is incompatible with "Sequence[object]"
+ "Literal['test']" is incompatible with "None" (reportArgumentType)
- 743 errors, 77 warnings, 0 informations
+ 744 errors, 77 warnings, 0 informations
steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/id.py:134:98 - error: Argument of type "str" cannot be assigned to parameter "key" of type "LiteralString" in function "__getitem__"
+ "str" is incompatible with "LiteralString" (reportArgumentType)
+ /tmp/mypy_primer/projects/steam.py/steam/id.py:143:98 - error: Argument of type "str" cannot be assigned to parameter "key" of type "LiteralString" in function "__getitem__"
+ "str" is incompatible with "LiteralString" (reportArgumentType)
- 8454 errors, 89 warnings, 0 informations
+ 8456 errors, 89 warnings, 0 informations
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_frame.py:1731:37 - error: Argument of type "Literal['A']" cannot be assigned to parameter "column" of type "Sequence[Hashable]" in function "explode"
+ "Literal['A']" is incompatible with "Sequence[Hashable]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_frame.py:1732:37 - error: Argument of type "Literal['A']" cannot be assigned to parameter "column" of type "Sequence[Hashable]" in function "explode"
+ "Literal['A']" is incompatible with "Sequence[Hashable]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_frame.py:1733:37 - error: Argument of type "Literal['A']" cannot be assigned to parameter "column" of type "Sequence[Hashable]" in function "explode"
+ "Literal['A']" is incompatible with "Sequence[Hashable]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_io.py:1556:50 - error: Argument of type "list[str]" cannot be assigned to parameter "parse_dates" of type "bool | Sequence[int] | Sequence[Sequence[str] | Sequence[int]] | dict[str, Sequence[int] | list[str]]" in function "read_excel"
+ Type "Literal['col1']" is incompatible with type "Sequence[str] | Sequence[int]"
+ "Literal['col1']" is incompatible with "Sequence[str]"
+ "Literal['col1']" is incompatible with "Sequence[int]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_io.py:1564:40 - error: Argument of type "list[str]" cannot be assigned to parameter "parse_dates" of type "bool | Sequence[int] | Sequence[Sequence[str] | Sequence[int]] | dict[str, Sequence[int] | list[str]]" in function "read_excel"
+ Type "Literal['col1']" is incompatible with type "Sequence[str] | Sequence[int]"
+ "Literal['col1']" is incompatible with "Sequence[str]"
+ "Literal['col1']" is incompatible with "Sequence[int]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_io.py:1572:50 - error: Argument of type "list[str]" cannot be assigned to parameter "parse_dates" of type "bool | Sequence[int] | Sequence[Sequence[str] | Sequence[int]] | dict[str, Sequence[int] | list[str]]" in function "read_excel"
+ Type "Literal['col1']" is incompatible with type "Sequence[str] | Sequence[int]"
+ "Literal['col1']" is incompatible with "Sequence[str]"
+ "Literal['col1']" is incompatible with "Sequence[int]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_plotting.py:512:13 - error: No overloads for "__call__" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/pandas-stubs/tests/test_plotting.py:523:23 - error: Argument of type "Literal['Some title']" cannot be assigned to parameter "title" of type "Sequence[str] | None" in function "__call__"
+ Type "Literal['Some title']" is incompatible with type "Sequence[str] | None"
+ "Literal['Some title']" is incompatible with "Sequence[str]"
+ "Literal['Some title']" is incompatible with "None" (reportArgumentType)
- 1489 errors, 0 warnings, 0 informations
+ 1497 errors, 0 warnings, 0 informations
Diff from mypy_primer, showing the effect of this PR on open source code:
bandersnatch (https://github.com/pypa/bandersnatch)
+ /tmp/mypy_primer/projects/bandersnatch/src/bandersnatch/configuration.py:76:55 - error: Argument of type "Literal['=']" cannot be assigned to parameter "delimiters" of type "Sequence[str]" in function "__init__"
+ "Literal['=']" is incompatible with "Sequence[str]" (reportArgumentType)
- 113 errors, 1 warning, 0 informations
+ 114 errors, 1 warning, 0 informations
graphql-core (https://github.com/graphql-python/graphql-core)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:87:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:100:31 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:121:32 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:148:48 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:156:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:169:31 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:248:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:264:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:276:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:290:37 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:302:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:314:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:326:22 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
+ Type "str" is incompatible with type "Strings | None"
+ "str" is incompatible with protocol "Collection[str]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/printer.py:335:38 - error: Argument of type "str" cannot be assigned to parameter "strings" of type "Strings | None" in function "join"
... (truncated 91 lines) ...
poetry (https://github.com/python-poetry/poetry)
- "str" is incompatible with "Sequence[Extension]"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Extension"
- "str" is incompatible with "Extension" (reportArgumentType)
+ "str" is incompatible with "Sequence[Extension]" (reportArgumentType)
- "str" is incompatible with "Sequence[Extension]"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Extension"
- "str" is incompatible with "Extension" (reportArgumentType)
+ "str" is incompatible with "Sequence[Extension]" (reportArgumentType)
- "str" is incompatible with "Sequence[Extension]"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Extension"
- "str" is incompatible with "Extension" (reportArgumentType)
+ "str" is incompatible with "Sequence[Extension]" (reportArgumentType)
- "str" is incompatible with "Sequence[Extension]"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Extension"
- "str" is incompatible with "Extension" (reportArgumentType)
+ "str" is incompatible with "Sequence[Extension]" (reportArgumentType)
black (https://github.com/psf/black)
+ /tmp/mypy_primer/projects/black/src/black/trans.py:1810:49 - error: Argument of type "str" cannot be assigned to parameter "seq" of type "Sequence[Any]" in function "is_valid_index_factory"
+ "str" is incompatible with "Sequence[Any]" (reportArgumentType)
- 73 errors, 9 warnings, 0 informations
+ 74 errors, 9 warnings, 0 informations
pycryptodome (https://github.com/Legrandin/pycryptodome)
+ /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Random/test_random.py:149:27 - error: Argument of type "Literal['123']" cannot be assigned to parameter "population" of type "Sequence[Unknown]" in function "sample"
+ "Literal['123']" is incompatible with "Sequence[Unknown]" (reportArgumentType)
- 1643 errors, 55 warnings, 0 informations
+ 1644 errors, 55 warnings, 0 informations
mypy (https://github.com/python/mypy)
+ /tmp/mypy_primer/projects/mypy/mypy/messages.py:3155:23 - error: No overloads for "__init__" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/mypy/mypy/messages.py:3155:49 - error: Argument of type "str" cannot be assigned to parameter "a" of type "Sequence[str]" in function "__init__"
+ "str" is incompatible with "Sequence[str]" (reportArgumentType)
+ /tmp/mypy_primer/projects/mypy/mypy/messages.py:3155:60 - error: Argument of type "str" cannot be assigned to parameter "b" of type "Sequence[str]" in function "__init__"
+ "str" is incompatible with "Sequence[str]" (reportArgumentType)
+ /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/difflib.pyi:39:28 - error: Expression of type "Literal['']" cannot be assigned to parameter of type "Sequence[str]"
+ "Literal['']" is incompatible with "Sequence[str]" (reportArgumentType)
+ /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/difflib.pyi:40:28 - error: Expression of type "Literal['']" cannot be assigned to parameter of type "Sequence[str]"
+ "Literal['']" is incompatible with "Sequence[str]" (reportArgumentType)
- 1745 errors, 108 warnings, 0 informations
+ 1750 errors, 108 warnings, 0 informations
sympy (https://github.com/sympy/sympy)
- /tmp/mypy_primer/projects/sympy/sympy/geometry/line.py:1212:60 - error: Operator "-" not supported for types "set[str]" and "set[Unknown | Basic | Symbol]" (reportOperatorIssue)
+ /tmp/mypy_primer/projects/sympy/sympy/geometry/line.py:1212:60 - error: Operator "-" not supported for types "set[LiteralString]" and "set[Unknown | Basic | Symbol]" (reportOperatorIssue)
- "str" is incompatible with "Iterable[_SupportsSumNoDefaultT@sum]"
+ "str" is incompatible with protocol "Iterable[_SupportsSumNoDefaultT@sum]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
- "str" is incompatible with "Iterable[_SupportsSumNoDefaultT@sum]"
+ "str" is incompatible with protocol "Iterable[_SupportsSumNoDefaultT@sum]"
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ /tmp/mypy_primer/projects/sympy/sympy/testing/tmpfiles.py
+ /tmp/mypy_primer/projects/sympy/sympy/testing/tmpfiles.py:18:27 - error: Argument of type "str" cannot be assigned to parameter "element" of type "LiteralString" in function "add"
+ "str" is incompatible with "LiteralString" (reportArgumentType)
+ /tmp/mypy_primer/projects/sympy/sympy/testing/tmpfiles.py:23:29 - error: Argument of type "str" cannot be assigned to parameter "element" of type "LiteralString" in function "add"
+ "str" is incompatible with "LiteralString" (reportArgumentType)
- "str" is incompatible with "Iterable[None]"
+ "str" is incompatible with protocol "Iterable[None]"
- Type parameter "_T_co@Iterable" is covariant, but "str" is not a subtype of "None"
- "str" is incompatible with "None" (reportArgumentType)
+ Could not bind method "__iter__" because "str" is not assignable to parameter "self"
+ "str" is incompatible with "LiteralString"
+ "__iter__" is an incompatible type
+ Type "() -> Iterator[str]" is incompatible with type "() -> Iterator[_T_co@Iterable]"
+ Function return type "Iterator[str]" is incompatible with type "Iterator[_T_co@Iterable]" (reportArgumentType)
- 68346 errors, 1225 warnings, 0 informations
+ 68348 errors, 1225 warnings, 0 informations
websockets (https://github.com/aaugustin/websockets)
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Subprotocol"
- "str" is incompatible with "Subprotocol"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "Subprotocol"
- "str" is incompatible with "Subprotocol"
dedupe (https://github.com/dedupeio/dedupe)
- /tmp/mypy_primer/projects/dedupe/dedupe/canonical.py:39:12 - error: Expression of type "str | Sequence[str]" is incompatible with return type "str"
- Type "str | Sequence[str]" is incompatible with type "str"
- "Sequence[str]" is incompatible with "str" (reportReturnType)
- /tmp/mypy_primer/projects/dedupe/dedupe/canonical.py:53:12 - error: Expression of type "Sequence[str]" is incompatible with return type "str"
- "Sequence[str]" is incompatible with "str" (reportReturnType)
- 164 errors, 1 warning, 0 informations
+ 162 errors, 1 warning, 0 informations
sphinx (https://github.com/sphinx-doc/sphinx)
+ /tmp/mypy_primer/projects/sphinx/sphinx/ext/imgmath.py:115:26 - error: Argument of type "str" cannot be assigned to parameter "template_path" of type "Sequence[str | PathLike[str]] | None" in function "__init__"
+ Type "str" is incompatible with type "Sequence[str | PathLike[str]] | None"
+ "str" is incompatible with "Sequence[str | PathLike[str]]"
+ "str" is incompatible with "None" (reportArgumentType)
+ /tmp/mypy_primer/projects/sphinx/sphinx/util/template.py:56:20 - error: Argument of type "str" cannot be assigned to parameter "search_path" of type "Sequence[str | PathLike[str]]" in function "__init__"
+ "str" is incompatible with "Sequence[str | PathLike[str]]" (reportArgumentType)
+ /tmp/mypy_primer/projects/sphinx/sphinx/util/template.py:62:29 - error: Expression of type "str" is incompatible with declared type "Sequence[str | PathLike[str]] | None"
+ Type "str" is incompatible with type "Sequence[str | PathLike[str]] | None"
+ "str" is incompatible with "Sequence[str | PathLike[str]]"
+ "str" is incompatible with "None" (reportAssignmentType)
+ /tmp/mypy_primer/projects/sphinx/sphinx/util/template.py:63:26 - error: Argument of type "Sequence[str | PathLike[str]] | None" cannot be assigned to parameter "search_path" of type "Sequence[str | PathLike[str]]" in function "__init__"
+ Type "Sequence[str | PathLike[str]] | None" is incompatible with type "Sequence[str | PathLike[str]]"
+ "None" is incompatible with "Sequence[str | PathLike[str]]" (reportArgumentType)
- 560 errors, 421 warnings, 0 informations
+ 564 errors, 421 warnings, 0 informations
scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ /tmp/mypy_primer/projects/scikit-learn/sklearn/tests/test_common.py:241:48 - error: Argument of type "Literal['dummy']" cannot be assigned to parameter "fromlist" of type "Sequence[str]" in function "__import__"
+ "Literal['dummy']" is incompatible with "Sequence[str]" (reportArgumentType)
+ Attribute "data" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/multiclass.py:402:45 - error: Cannot access attribute "data" for class "<subclass of bytes and str>"
+ Attribute "data" is unknown (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/multiclass.py:402:45 - error: Cannot access attribute "data" for class "<subclass of bytearray and str>"
- 10303 errors, 59 warnings, 0 informations
+ 10306 errors, 59 warnings, 0 informations
attrs (https://github.com/python-attrs/attrs)
- /tmp/mypy_primer/projects/attrs/tests/test_validators.py:420:24 - error: Argument of type "None" cannot be assigned to parameter of type "str"
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:417:17 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
- "None" is incompatible with "str" (reportArgumentType)
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1108:22 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1118:23 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1127:13 - error: No overloads for "format" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1129:26 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1204:22 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1217:23 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1235:23 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/test_validators.py:1255:23 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[_T@in_]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:220:14 - error: No overloads for "attrib" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:221:60 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:223:14 - error: No overloads for "attrib" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:225:33 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:228:14 - error: No overloads for "attrib" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:230:33 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:233:14 - error: No overloads for "attrib" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:234:60 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:236:14 - error: No overloads for "attrib" match the provided arguments (reportCallIssue)
+ /tmp/mypy_primer/projects/attrs/tests/typing_example.py:237:60 - error: Argument of type "Literal['abc']" cannot be assigned to parameter "options" of type "Container[_T@in_]" in function "in_"
+ "Literal['abc']" is incompatible with protocol "Container[Unknown]"
+ "__contains__" is an incompatible type
+ Type "(key: str, /) -> bool" is incompatible with type "(x: object, /) -> bool"
+ Parameter 1: type "object" is incompatible with type "str"
+ "object" is incompatible with "str" (reportArgumentType)
- 941 errors, 44 warnings, 5 informations
+ 959 errors, 44 warnings, 5 informations
pip (https://github.com/pypa/pip)
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/packaging/_musllinux.py
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/packaging/_musllinux.py:84:28 - error: Argument of type "str" cannot be assigned to parameter "archs" of type "Sequence[str]" in function "platform_tags"
+ "str" is incompatible with "Sequence[str]" (reportArgumentType)
- "str" is incompatible with "Sequence[MarkerAtom]"
- Type parameter "_T_co@Sequence" is covariant, but "str" is not a subtype of "MarkerAtom"
- Type "str" is incompatible with type "MarkerAtom"
- "str" is incompatible with "Tuple[MarkerVar, Op, MarkerVar]"
- "str" is incompatible with "Sequence[MarkerAtom]" (reportArgumentType)
+ "str" is incompatible with "Sequence[MarkerAtom]" (reportArgumentType)
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/packaging/_parser.py:288:34 - error: Expression of type "MarkerList" is incompatible with declared type "MarkerAtom"
+ Type "MarkerList" is incompatible with type "MarkerAtom"
+ "Sequence[MarkerAtom | MarkerList | str]" is incompatible with "Tuple[MarkerVar, Op, MarkerVar]"
+ "Sequence[MarkerAtom | MarkerList | str]" is incompatible with "Sequence[MarkerAtom]"
+ Type parameter "_T_co@Sequence" is covariant, but "MarkerAtom | MarkerList | str" is not a subtype of "MarkerAtom" (reportAssignmentType)
- "Sequence[Unknown]" is incompatible with "Op" (reportArgumentType)
+ "str" is incompatible with "Op" (reportArgumentType)
- 1864 errors, 46 warnings, 0 informations
+ 1866 errors, 46 warnings, 0 informations
scrapy (https://github.com/scrapy/scrapy)
... (truncated 687 lines) ...```