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

Explore the removal of Sequence[str] as a base class to str. #8259

Closed
wants to merge 2 commits into from

Conversation

erictraut
Copy link
Collaborator

No description provided.

@erictraut
Copy link
Collaborator Author

This relates to:
python/typing#256
python/mypy#11001
#8222

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Jul 5, 2024

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) ...```

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