We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug Report
Python code
FOO = frozenset("abc") BAR = FOO and next(iter(FOO))
Mypy reports and error
wtf.py:2: error: Argument 1 to "iter" has incompatible type "FrozenSet[str]"; expected "Iterable[FrozenSet[str]]"
Expected Behavior
Ideally, mypy should infer that type of BAR is "falsey or string". If not that, then "empty set or string". if not that, then "set or string".
mypy
BAR
Actual Behavior
mypy seems to be tripped by X op func(X), gets confused 😖 mypy complains about the argument to iter 🤷🏿
X op func(X)
Note that expression like BAR = next(iter(FOO)) is understood correctly.
BAR = next(iter(FOO))
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
Python code
Mypy reports and error
Expected Behavior
Ideally,
mypy
should infer that type ofBAR
is "falsey or string".If not that, then "empty set or string".
if not that, then "set or string".
Actual Behavior
mypy
seems to be tripped byX op func(X)
, gets confused 😖mypy
complains about the argument to iter 🤷🏿Note that expression like
BAR = next(iter(FOO))
is understood correctly.Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: