-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add --disallow-str-iteration flag #20577
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
base: master
Are you sure you want to change the base?
Add --disallow-str-iteration flag #20577
Conversation
for more information, see https://pre-commit.ci
mypy/typeshed/stdlib/builtins.pyi
Outdated
| def __getitem__(self, i: int, /) -> _T_co: ... | ||
|
|
||
| @overload | ||
| def iter(object: str, /) -> Iterable[str]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be in a patch file, or it will be overwritten next time we sync typeshed. Look for similar patch files in the repo (there are a few related to LiteralString).
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I think the apprise diff is expected given that we added a new overload. The full diagnostic is: |
|
Diff from mypy_primer, showing the effect of this PR on open source code: beartype (https://github.com/beartype/beartype)
+ beartype/_data/kind/datakindtext.py:18: error: Argument 1 to "frozenset" has incompatible type "str"; expected "Iterable[str]" [arg-type]
spack (https://github.com/spack/spack)
+ lib/spack/spack/schema/mirrors.py:103: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[object]" [dict-item]
+ lib/spack/spack/schema/mirrors.py:107: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[object]" [dict-item]
+ lib/spack/spack/llnl/util/filesystem.py:2182: error: Iterating over "str | list[str]" is disallowed [misc]
+ lib/spack/spack/llnl/util/filesystem.py:2182: note: This is because --disallow-str-iteration is enabled
+ lib/spack/spack/llnl/util/filesystem.py:2340: error: Iterating over "str | list[str]" is disallowed [misc]
+ lib/spack/spack/llnl/util/filesystem.py:2340: note: This is because --disallow-str-iteration is enabled
+ lib/spack/spack/llnl/util/filesystem.py:2418: error: Iterating over "str | list[str]" is disallowed [misc]
+ lib/spack/spack/llnl/util/filesystem.py:2418: note: This is because --disallow-str-iteration is enabled
+ lib/spack/spack/version/version_types.py:964: error: Iterating over "str | Iterable[Any]" is disallowed [misc]
+ lib/spack/spack/version/version_types.py:964: note: This is because --disallow-str-iteration is enabled
+ lib/spack/spack/schema/modules.py:48: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:52: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:56: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:61: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:95: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:100: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:110: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:154: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:159: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:164: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/schema/modules.py:219: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]" [dict-item]
+ lib/spack/spack/install_test.py:521: error: Argument 1 to "join" of "str" has incompatible type "Any | str"; expected "Iterable[str]" [arg-type]
+ lib/spack/spack/bootstrap/status.py:88: error: Incompatible types in assignment (expression has type "dict[Sequence[str], str]", variable has type "dict[str | Sequence[str], str]") [assignment]
+ lib/spack/spack/bootstrap/status.py:88: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ lib/spack/spack/bootstrap/status.py:88: note: Consider using "Mapping" instead, which is covariant in the value type
+ lib/spack/spack/test/spec_yaml.py:330: error: List item 0 has incompatible type "tuple[str, str]"; expected "tuple[str, Collection[str]]" [list-item]
+ lib/spack/spack/test/spec_yaml.py:331: error: List item 1 has incompatible type "tuple[str, str]"; expected "tuple[str, Collection[str]]" [list-item]
+ lib/spack/spack/cmd/info.py:151: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
com2ann (https://github.com/ilevkivskyi/com2ann)
+ src/com2ann.py:436: error: Iterating over "str" is disallowed [misc]
+ src/com2ann.py:436: note: This is because --disallow-str-iteration is enabled
+ src/com2ann.py:633: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/libclinic/codegen.py:161: error: Argument 1 to "join" of "str" has incompatible type "str"; expected "Iterable[str]" [arg-type]
hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/cythons/modelutils.py:2806: error: Iterating over "str" is disallowed [misc]
+ hydpy/cythons/modelutils.py:2806: note: This is because --disallow-str-iteration is enabled
+ hydpy/core/timetools.py:527: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ hydpy/core/devicetools.py:3153: error: Incompatible types in assignment (expression has type "str | Iterable[str] | None", variable has type "Iterable[str] | None") [assignment]
+ hydpy/auxs/networktools.py:188: error: Argument 1 to "zip" has incompatible type "RiverBasinNumber"; expected "Iterable[str]" [arg-type]
+ hydpy/auxs/networktools.py:188: error: Argument 2 to "zip" has incompatible type "RiverBasinNumber"; expected "Iterable[str]" [arg-type]
+ hydpy/auxs/networktools.py:273: error: Iterating over "RiverBasinNumber" is disallowed [misc]
+ hydpy/auxs/networktools.py:273: note: This is because --disallow-str-iteration is enabled
+ hydpy/auxs/networktools.py:368: error: Iterating over "RiverBasinNumber" is disallowed [misc]
+ hydpy/auxs/networktools.py:368: note: This is because --disallow-str-iteration is enabled
+ hydpy/auxs/interptools.py:160: error: Argument 1 to "product" has incompatible type "str | list[str]"; expected "Iterable[str]" [arg-type]
+ hydpy/auxs/interptools.py:160: error: Argument 2 to "product" has incompatible type "str | list[str]"; expected "Iterable[str]" [arg-type]
optuna (https://github.com/optuna/optuna)
+ optuna/testing/pytest_storages.py:932: error: Incompatible types in assignment (expression has type "dict[str, Mapping[str, JSONSerializable] | Sequence[JSONSerializable] | int | float | None]", variable has type "dict[str, JSONSerializable]") [assignment]
+ optuna/testing/pytest_storages.py:932: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ optuna/testing/pytest_storages.py:932: note: Consider using "Mapping" instead, which is covariant in the value type
+ optuna/testing/pytest_storages.py:933: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Mapping[str, JSONSerializable] | Sequence[JSONSerializable] | int | float | None" [dict-item]
+ optuna/testing/pytest_storages.py:935: error: List item 0 has incompatible type "str"; expected "Mapping[str, JSONSerializable] | Sequence[JSONSerializable] | int | float | None" [list-item]
+ optuna/testing/pytest_storages.py:935: error: List item 1 has incompatible type "str"; expected "Mapping[str, JSONSerializable] | Sequence[JSONSerializable] | int | float | None" [list-item]
+ tests/storages_tests/rdb_tests/test_storage.py:366: error: Argument 2 to "OperationalError" has incompatible type "str"; expected "Sequence[Sequence[Any]] | Sequence[Mapping[str, Any]] | Sequence[Any] | Mapping[str, Any] | None" [arg-type]
+ tests/visualization_tests/test_hypervolume_history.py:26: error: Iterating over "str" is disallowed [misc]
+ tests/visualization_tests/test_hypervolume_history.py:26: note: This is because --disallow-str-iteration is enabled
+ tests/visualization_tests/test_hypervolume_history.py:52: error: Argument "directions" to "create_study" has incompatible type "str"; expected "Sequence[str | StudyDirection] | None" [arg-type]
+ tests/study_tests/test_study.py:177: error: Argument "directions" to "create_study" has incompatible type "str"; expected "Sequence[str | StudyDirection] | None" [arg-type]
+ optuna/visualization/_parallel_coordinate.py:289: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]" [dict-item]
+ optuna/visualization/_parallel_coordinate.py:297: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]" [dict-item]
spark (https://github.com/apache/spark)
+ python/pyspark/sql/variant_utils.py:677: error: Iterating over "str" is disallowed [misc]
+ python/pyspark/sql/variant_utils.py:677: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/sql/classic/dataframe.py:1516: error: Iterating over "str | list[str]" is disallowed [misc]
+ python/pyspark/sql/classic/dataframe.py:1516: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/pandas/frame.py:7331: error: Argument 1 to "list" has incompatible type "str | list[str] | None"; expected "Iterable[str]" [arg-type]
+ python/pyspark/pandas/frame.py:7336: error: Argument 1 to "list" has incompatible type "str | list[str] | None"; expected "Iterable[str]" [arg-type]
+ python/pyspark/sql/connect/dataframe.py:1588: error: Iterating over "str | list[str]" is disallowed [misc]
+ python/pyspark/sql/connect/dataframe.py:1588: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/sql/connect/dataframe.py:1635: error: Argument 1 to "list" has incompatible type "str | list[str]"; expected "Iterable[str]" [arg-type]
psycopg (https://github.com/psycopg/psycopg)
+ psycopg/psycopg/errors.py:80: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/errors.py:556: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_encodings.py:130: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/rows.py:216: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/rows.py:234: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_struct.py:49: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:183: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:277: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:302: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:306: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:321: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:325: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:338: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_py_transformer.py:355: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_conninfo_utils.py:34: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_conninfo_utils.py:42: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_conninfo_attempts_async.py:46: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_conninfo_attempts.py:48: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/conninfo.py:103: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/conninfo.py:140: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_info.py:53: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/transaction.py:239: error: Argument 1 to "OutOfOrderTransactionNesting" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_typeinfo.py:139: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_capabilities.py:110: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:47: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:160: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:181: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:221: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:274: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:285: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/waiting.py:394: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_adapters_map.py:228: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_adapters_map.py:260: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:81: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:92: error: Argument 1 to "ConnectionTimeout" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:101: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:106: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:117: error: Argument 1 to "CancellationTimeout" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:127: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:130: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:274: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/generators.py:326: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:49: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:74: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:86: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:102: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:115: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_tstrings.py:141: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:141: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:161: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:238: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:418: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:424: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:429: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:441: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_queries.py:483: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_pipeline_base.py:168: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_copy_base.py:87: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_copy_base.py:264: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/string.py:52: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:365: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:380: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:396: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:410: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:475: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:493: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:496: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:500: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:603: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:606: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:613: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:624: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_cursor_base.py:638: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:260: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:265: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:313: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:486: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:523: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:532: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:534: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:574: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:580: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:594: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:600: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:638: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:644: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:653: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:657: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:672: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_connection_base.py:679: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/cursor_async.py:166: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/cursor.py:166: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_server_cursor_base.py:167: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/client_cursor.py:62: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_server_cursor_async.py:90: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_server_cursor_async.py:105: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_server_cursor.py:91: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/_server_cursor.py:106: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/connection_async.py:145: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/connection_async.py:597: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/connection.py:129: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/connection.py:542: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/range.py:441: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/range.py:467: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/numeric.py:342: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/json.py:280: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/enum.py:91: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:76: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:246: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:267: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:269: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:271: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:283: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:285: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
+ psycopg/psycopg/types/datetime.py:294: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]" [arg-type]
... (truncated 69 lines) ...
tornado (https://github.com/tornadoweb/tornado)
+ tornado/util.py:179: error: Argument 1 to "frozenset" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ tornado/test/escape_test.py:260: error: List item 0 has incompatible type "tuple[str, str, str]"; expected "tuple[str, Sequence[object], str | None]" [list-item]
+ tornado/test/escape_test.py:261: error: List item 1 has incompatible type "tuple[str, str, str]"; expected "tuple[str, Sequence[object], str | None]" [list-item]
+ tornado/test/tcpserver_test.py:158: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ tornado/test/tcpserver_test.py:180: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ tornado/test/tcpserver_test.py:202: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ tornado/test/tcpserver_test.py:229: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/_sdk/naming.py:110: error: Iterating over "str" is disallowed [misc]
+ src/prefect/_sdk/naming.py:110: note: This is because --disallow-str-iteration is enabled
+ src/prefect/_sdk/naming.py:180: error: Iterating over "str" is disallowed [misc]
+ src/prefect/_sdk/naming.py:180: note: This is because --disallow-str-iteration is enabled
+ src/prefect/utilities/urls.py:123: error: Iterating over "str | Any" is disallowed [misc]
+ src/prefect/utilities/urls.py:123: note: This is because --disallow-str-iteration is enabled
+ src/prefect/deployments/runner.py:635: error: List item 1 has incompatible type "tuple[str, Iterable[str] | str | None]"; expected "tuple[str, Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None]" [list-item]
+ src/prefect/deployments/runner.py:635: error: List item 2 has incompatible type "tuple[str, Iterable[str] | str | None]"; expected "tuple[str, Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None]" [list-item]
+ src/prefect/cli/cloud/__init__.py:226: error: Argument 1 to "enumerate" has incompatible type "list[str] | list[tuple[T, str]]"; expected "Iterable[Sequence[T | str]]" [arg-type]
+ src/prefect/infrastructure/provisioners/ecs.py:1345: error: Iterating over "str | Any" is disallowed [misc]
+ src/prefect/infrastructure/provisioners/ecs.py:1345: note: This is because --disallow-str-iteration is enabled
+ src/prefect/infrastructure/provisioners/container_instance.py:637: error: Iterating over "str | dict[str, Any]" is disallowed [misc]
+ src/prefect/infrastructure/provisioners/container_instance.py:637: note: This is because --disallow-str-iteration is enabled
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/saslprep.py:88: error: Iterating over "str" is disallowed [misc]
+ pymongo/saslprep.py:88: note: This is because --disallow-str-iteration is enabled
+ bson/decimal128.py:305: error: Iterating over "str" is disallowed [misc]
+ bson/decimal128.py:305: note: This is because --disallow-str-iteration is enabled
+ pymongo/uri_parser_shared.py:201: error: Iterating over "str" is disallowed [misc]
+ pymongo/uri_parser_shared.py:201: note: This is because --disallow-str-iteration is enabled
+ pymongo/uri_parser_shared.py:202: error: Iterating over "str" is disallowed [misc]
+ pymongo/uri_parser_shared.py:202: note: This is because --disallow-str-iteration is enabled
+ pymongo/compression_support.py:64: error: Argument 1 to "list" has incompatible type "str | Iterable[str]"; expected "Iterable[str | Any]" [arg-type]
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/v1/color.py:59: error: Iterating over "str" is disallowed [misc]
+ pydantic/v1/color.py:59: note: This is because --disallow-str-iteration is enabled
+ pydantic/v1/schema.py:515: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[Collection[str]]" [dict-item]
+ pydantic/color.py:68: error: Iterating over "str" is disallowed [misc]
+ pydantic/color.py:68: note: This is because --disallow-str-iteration is enabled
+ pydantic/v1/_hypothesis_plugin.py:124: error: Iterating over "str" is disallowed [misc]
+ pydantic/v1/_hypothesis_plugin.py:124: note: This is because --disallow-str-iteration is enabled
mkosi (https://github.com/systemd/mkosi)
+ mkosi/versioncomp.py:27:35: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/versioncomp.py:33:78: error: Argument 2 to "takewhile" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/versioncomp.py:36:85: error: Argument 2 to "takewhile" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:4604:18: error: Iterating over "str | Sequence[Any]" is disallowed [misc]
+ mkosi/config.py:4604:18: note: This is because --disallow-str-iteration is enabled
+ mkosi/config.py:4638:18: error: Iterating over "str" is disallowed [misc]
+ mkosi/config.py:4638:18: note: This is because --disallow-str-iteration is enabled
+ mkosi/config.py:4643:31: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:4652:31: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:4673:35: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:4679:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:4682:23: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mkosi/config.py:6036:91: error: Iterating over "str" is disallowed [misc]
+ mkosi/config.py:6036:91: note: This is because --disallow-str-iteration is enabled
+ mkosi/__init__.py:2219:49: error: Iterating over "str" is disallowed [misc]
+ mkosi/__init__.py:2219:49: note: This is because --disallow-str-iteration is enabled
PyGithub (https://github.com/PyGithub/PyGithub)
+ github/Repository.py:1970: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]") [assignment]
+ github/Repository.py:1976: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]") [assignment]
+ github/Repository.py:1978: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]") [assignment]
bandersnatch (https://github.com/pypa/bandersnatch)
+ src/bandersnatch/configuration.py: note: In member "__init__" of class "BandersnatchConfig":
+ src/bandersnatch/configuration.py:77: error: Argument "delimiters" to "__init__" of "RawConfigParser" has incompatible type "str"; expected "Sequence[str]" [arg-type]
pylox (https://github.com/sco1/pylox)
+ pylox/builtins/py_builtins.py:358: error: Argument 1 to "_lox_arrayize" has incompatible type "str"; expected "Iterable[Any]" [arg-type]
+ tests/builtins/test_loxarrayize.py:9: error: Argument 1 to "deque" has incompatible type "str"; expected "Iterable[str]" [arg-type]
cibuildwheel (https://github.com/pypa/cibuildwheel)
+ cibuildwheel/options.py:258: error: Unpacked dict entry 0 has incompatible type "Mapping[str, str | Sequence[str]]"; expected "SupportsKeysAndGetItem[str, int | Sequence[str | int | bool]]" [dict-item]
+ cibuildwheel/options.py:258: error: Unpacked dict entry 1 has incompatible type "Mapping[str, str | Sequence[str]]"; expected "SupportsKeysAndGetItem[str, int | Sequence[str | int | bool]]" [dict-item]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/hdrs.py:114:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/hdrs.py:114:60: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/hdrs.py:117:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/hdrs.py:117:63: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/hdrs.py:120:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/hdrs.py:120:55: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/helpers.py:420:28: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/helpers.py:448:41: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/helpers.py:455:44: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/http_parser.py:59:33: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/multipart.py:77:46: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ aiohttp/web_urldispatcher.py:573:39: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "SupportsInt | Sequence[str | SupportsInt | float]" [dict-item]
+ aiohttp/web_urldispatcher.py:573:39: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-dict-item for more info
colour (https://github.com/colour-science/colour)
+ colour/utilities/verbose.py:234: error: Argument 1 to "chain" has incompatible type "*list[str | list[str]]"; expected "Iterable[str]" [arg-type]
+ colour/geometry/primitives.py:375: error: Iterating over "Literal['-x', '+x', '-y', '+y', '-z', '+z', 'xy', 'xz', 'yz', 'yx', 'zx', 'zy']" is disallowed [misc]
+ colour/geometry/primitives.py:375: note: This is because --disallow-str-iteration is enabled
+ colour/io/ctl.py:428: error: Argument 2 to "optional" has incompatible type "str"; expected "Sequence[str]" [arg-type]
+ colour/io/ctl.py:553: error: Argument 2 to "optional" has incompatible type "str"; expected "Sequence[str]" [arg-type]
+ colour/plotting/common.py:881: error: Iterating over "str" is disallowed [misc]
+ colour/plotting/common.py:881: note: This is because --disallow-str-iteration is enabled
+ colour/plotting/common.py:886: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ colour/plotting/volume.py:257: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ colour/plotting/volume.py:285: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ colour/plotting/volume.py:626: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ colour/plotting/volume.py:634: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ colour/plotting/temperature.py:617: error: Argument 1 to "optional" has incompatible type "str | Sequence[str] | None"; expected "Sequence[str] | None" [arg-type]
+ colour/utilities/tests/test_array.py:536: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]" [arg-type]
python-chess (https://github.com/niklasf/python-chess)
+ chess/__init__.py:1186: error: Iterating over "str" is disallowed [misc]
+ chess/__init__.py:1186: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:1213: error: Iterating over "str" is disallowed [misc]
+ chess/__init__.py:1213: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:2746: error: Iterating over "str" is disallowed [misc]
+ chess/__init__.py:2746: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:2928: error: Argument 1 to "chain" has incompatible type "str"; expected "Iterable[str | None]" [arg-type]
+ chess/variant.py:841: error: Incompatible default for argument "symbols" (default has type "str", argument has type "Iterable[str]") [assignment]
+ chess/variant.py:1036: error: Iterating over "str" is disallowed [misc]
+ chess/variant.py:1036: note: This is because --disallow-str-iteration is enabled
+ chess/variant.py:1037: error: Iterating over "str" is disallowed [misc]
+ chess/variant.py:1037: note: This is because --disallow-str-iteration is enabled
+ chess/syzygy.py:388: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ chess/syzygy.py:389: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ chess/syzygy.py:390: error: Iterating over "str" is disallowed [misc]
+ chess/syzygy.py:390: note: This is because --disallow-str-iteration is enabled
+ chess/engine.py:2498: error: Iterating over "str" is disallowed [misc]
+ chess/engine.py:2498: note: This is because --disallow-str-iteration is enabled
mypy_primer (https://github.com/hauntsaninja/mypy_primer)
+ mypy_primer/utils.py:92: error: Argument 1 to "join" has incompatible type "str | list[str]"; expected "Iterable[str]" [arg-type]
zipp (https://github.com/jaraco/zipp)
+ zipp/glob.py:25: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
meson (https://github.com/mesonbuild/meson)
+ mesonbuild/depfile.py:19:18: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/depfile.py:19:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:946:16: error: Iterating over "str | Iterable[str]" is disallowed [misc]
+ mesonbuild/utils/universal.py:946:16: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1161:17: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/utils/universal.py:1161:17: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1182:18: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/utils/universal.py:1182:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1204:18: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/utils/universal.py:1204:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1904:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str | list[str]"; expected "Iterable[str | Program]" [arg-type]
+ mesonbuild/utils/universal.py:1913:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str | list[str]"; expected "Iterable[str | Program]" [arg-type]
+ mesonbuild/cargo/cfg.py:60:27: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mesonbuild/cmdline.py:121:26: error: Argument 1 to "__init__" of "Action" has incompatible type "str"; expected "Sequence[str]" [arg-type]
+ mesonbuild/cmdline.py:141:26: error: Argument 1 to "__init__" of "Action" has incompatible type "str"; expected "Sequence[str]" [arg-type]
+ mesonbuild/interpreterbase/helpers.py:22:16: error: Incompatible return value type (got "list[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]", expected "list[TYPE_var]") [return-value]
+ mesonbuild/interpreterbase/helpers.py:22:16: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ mesonbuild/interpreterbase/helpers.py:22:16: note: Consider using "Sequence" instead, which is covariant
+ mesonbuild/interpreterbase/helpers.py:23:34: error: Incompatible types in assignment (expression has type "list[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]", variable has type "list[TYPE_var]") [assignment]
+ mesonbuild/interpreterbase/helpers.py:23:34: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ mesonbuild/interpreterbase/helpers.py:23:34: note: Consider using "Sequence" instead, which is covariant
+ mesonbuild/interpreterbase/helpers.py:39:20: error: Incompatible return value type (got "dict[str, int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]", expected "TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]") [return-value]
+ mesonbuild/interpreterbase/helpers.py:43:12: error: Incompatible return value type (got "tuple[list[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]], dict[str, int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]]", expected "tuple[list[TYPE_var], dict[str, TYPE_var]]") [return-value]
+ mesonbuild/cmake/common.py:85:14: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/cmake/common.py:85:14: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/cmake/common.py:177:56: error: Argument 1 to "join" of "str" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mesonbuild/compilers/cuda.py:219:24: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mesonbuild/compilers/cuda.py:225:24: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:114:10: error: Argument 1 to "__call__" of "_Wrapper" has incompatible type "def wrapper(self: InterpreterObject, other: TYPE_var) -> TYPE_var"; expected "def (self: InterpreterObject, other: TYPE_var) -> int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:114:16: error: Argument 1 to "wraps" has incompatible type "_TV_FN_Operator"; expected "Callable[[Any, Any], int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:207:68: error: Argument 1 to "zip_longest" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var] | type[Any] | tuple[type[Any], ...]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:226:28: error: Argument 1 to "list" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:228:34: error: Argument 1 to "tuple" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:232:43: error: Argument 1 to "list" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:234:38: error: Argument 1 to "tuple" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/decorators.py:236:34: error: Argument 1 to "tuple" has incompatible type "list[TYPE_elementary | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "Iterable[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]" [arg-type]
+ mesonbuild/interpreterbase/interpreterbase.py:287:32: error: Argument 1 to "_holderify" of "InterpreterBase" has incompatible type "dict[str, int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]"; expected "TYPE_var | InterpreterObject" [arg-type]
+ mesonbuild/interpreterbase/interpreterbase.py:568:16: error: Incompatible return value type (got "tuple[list[int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]], dict[str, int | dict[str, TYPE_elementary] | HoldableObject | MesonInterpreterObject | Sequence[TYPE_var] | dict[str, TYPE_var]]]", expected "tuple[list[TYPE_var], dict[str, TYPE_var]]") [return-value]
+ mesonbuild/cmake/interpreter.py:287:40: error: Iterating over "str" is disallowed [misc]
+ mesonbuild/cmake/interpreter.py:287:40: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/cmake/interpreter.py:1045:22: error: Incompatible types in assignment (expression has type "dict[str, int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]", variable has type "dict[str, str | int | bool | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]] | None") [assignment]
+ mesonbuild/cmake/interpreter.py:1057:22: error: Incompatible types in assignment (expression has type "dict[str, int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]", variable has type "dict[str, str | int | bool | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]] | None") [assignment]
+ mesonbuild/cmake/interpreter.py:1071:85: error: Argument 3 to "function" has incompatible type "dict[str, int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]"; expected "dict[str, str | int | bool | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]] | None" [arg-type]
+ mesonbuild/cmake/interpreter.py:1071:85: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ mesonbuild/cmake/interpreter.py:1071:85: note: Consider using "Mapping" instead, which is covariant in the value type
+ mesonbuild/cmake/interpreter.py:1071:86: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]" [dict-item]
+ mesonbuild/cmake/interpreter.py:1175:45: error: Incompatible types in assignment (expression has type "dict[str, int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]", variable has type "dict[str, str | int | bool | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]") [assignment]
+ mesonbuild/cmake/interpreter.py:1175:45: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ mesonbuild/cmake/interpreter.py:1175:45: note: Consider using "Mapping" instead, which is covariant in the value type
+ mesonbuild/cmake/interpreter.py:1207:45: error: Incompatible types in assignment (expression has type "dict[str, int | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]", variable has type "dict[str, str | int | bool | Path | BaseNode | Sequence[str | int | bool | Path | BaseNode]]") [assignment]
+ mesonbuild/cmake/interpreter.py:1207:45: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
+ mesonbuild/cmake/interpreter.py:1207:45: note: Consider using "Mapping" instead, which is covariant in the value type
... (truncated 2371 lines) ...``` |
Fixes #11001
Related to typing python/typing#256
Expected behavior changes under this flag:
strand its subtypes are no longer treated as subtypes ofCollection,Iterable,Sequenceor protocols that extend them. Assignment and argument passing will be treated as errors.iter()method has an additional overload which acceptsstr. This is the recommended way to iterate over characters when this flag is enabled.strto subtypes ofContainer, such asCollectionwill not report a conflict on the__contains__method, since this introduces noise. It is known thatstrdoes not conform to theContainerprotocol due to its incompatible signature for__contains__method.