[alt] Improve re overloads to help out pyright#9593
Closed
AlexWaygood wants to merge 1 commit intomainfrom
Closed
Conversation
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]
|
Member
Author
|
Doesn't look good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simpler approach than #9592, but let's see what mypy_primer says. Fixes #9591