Skip to content

Conversation

AlexWaygood
Copy link
Member

A simpler approach than #9592, but let's see what mypy_primer says. Fixes #9591

@github-actions
Copy link
Contributor

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

pip (https://github.com/pypa/pip)
+ src/pip/_internal/req/req_file.py:512: error: Unpacking a string is disallowed  [misc]
+ src/pip/_internal/req/req_file.py:513: error: Cannot determine type of "var_name"  [has-type]
+ src/pip/_internal/req/req_file.py:517: error: Cannot determine type of "env_var"  [has-type]

pybind11 (https://github.com/pybind/pybind11)
+ setup.py:73: error: Need type annotation for "matches" (hint: "matches: Dict[<type>, <type>] = ...")  [var-annotated]
+ setup.py:73: error: Argument 1 to "dict" has incompatible type "List[str]"; expected "Iterable[Tuple[<nothing>, <nothing>]]"  [arg-type]

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/pytester.py:582: error: Unpacking a string is disallowed  [misc]
+ src/_pytest/pytester.py:582: error: Cannot determine type of "noun"  [has-type]
+ src/_pytest/pytester.py:582: error: Cannot determine type of "count"  [has-type]

core (https://github.com/home-assistant/core)
+ homeassistant/components/sentry/__init__.py:168: error: Unpacking a string is disallowed  [misc]
+ homeassistant/components/sentry/__init__.py:170: error: Cannot determine type of "group1"  [has-type]
+ homeassistant/components/sentry/__init__.py:170: error: Cannot determine type of "group2"  [has-type]
+ homeassistant/components/sentry/__init__.py:170: error: Cannot determine type of "group3"  [has-type]
+ homeassistant/components/sentry/__init__.py:171: error: Cannot determine type of "group2"  [has-type]
+ homeassistant/components/sentry/__init__.py:174: error: Cannot determine type of "group3"  [has-type]
+ homeassistant/components/sentry/__init__.py:175: error: Cannot determine type of "group4"  [has-type]
+ homeassistant/components/sentry/__init__.py:176: error: Cannot determine type of "group4"  [has-type]
+ homeassistant/components/sentry/__init__.py:179: error: Cannot determine type of "group2"  [has-type]
+ homeassistant/components/sentry/__init__.py:179: error: Cannot determine type of "group3"  [has-type]
+ homeassistant/components/sentry/__init__.py:184: error: Cannot determine type of "group1"  [has-type]

sublime_debugger (https://github.com/daveleroy/sublime_debugger)
+ modules/ui/html.py:261: error: Unpacking a string is disallowed  [misc]
+ modules/ui/html.py:262: error: Cannot determine type of "string_double"  [has-type]
+ modules/ui/html.py:262: error: Cannot determine type of "string"  [has-type]
+ modules/ui/html.py:263: error: Cannot determine type of "number"  [has-type]
+ modules/ui/html.py:263: error: Cannot determine type of "number_hex"  [has-type]
+ modules/ui/html.py:268: error: Cannot determine type of "other"  [has-type]
+ modules/ui/html.py:269: error: Cannot determine type of "other"  [has-type]

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/utils.py:523: error: Unpacking a string is disallowed  [misc]
+ steam/utils.py:523: error: Cannot determine type of "key"  [has-type]
+ steam/utils.py:523: error: Cannot determine type of "value"  [has-type]
+ steam/utils.py:533: error: Unpacking a string is disallowed  [misc]
+ steam/utils.py:533: error: Cannot determine type of "key"  [has-type]
+ steam/utils.py:533: error: Cannot determine type of "value"  [has-type]

@AlexWaygood
Copy link
Member Author

Doesn't look good.

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.

re.match(), re.search() and re.fullmatch() cannot be used with AnyStr
1 participant