FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[alt] Improve `re` overloads to help out pyright by AlexWaygood · Pull Request #9593 · python/typeshed · GitHub

Repository navigation

[alt] Improve re overloads to help out pyright - #9593

Closed
AlexWaygood wants to merge 1 commit into
mainfrom
pyright-re-2
Closed

AlexWaygood wants to merge 1 commit into
mainfrom
pyright-re-2

Conversation

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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]

Copy link
Copy Markdown
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

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


Back | FazBrowse Home | New Git URL