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
Tuple unpacking gives error: Never object is not iterable
error: Never object is not iterable
To Reproduce
from typing import TypeVar, Union, Tuple, Any, Sequence T = TypeVar("T") OneOrMany = Union[T, Sequence[T]] def create_dataset(inputs: Union[OneOrMany[str], Tuple[Any]], ): if isinstance(inputs, tuple): if len(inputs) == 1: input_files = inputs[0] if isinstance(inputs, str): input_files = [inputs] elif len(inputs) == 2: input_files, labels = inputs elif len(inputs) == 3: input_files, labels, weights = inputs
Expected Behavior
No errors, gave no errors in mypy 1.6.1 release
Actual Behavior
sample.py:14: error: Never object is not iterable [misc] sample.py:16: error: Never object is not iterable [misc]
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
Thanks for the bug report! This was fixed yesterday, in efa5dcb (this issue is a duplicate of #16468).
The fix will be released in either mypy 1.7.1 or mypy 1.8 (follow #16341 for updates on possible patch releases for mypy 1.7)
Sorry, something went wrong.
No branches or pull requests
Bug Report
Tuple unpacking gives
error: Never object is not iterable
To Reproduce
Expected Behavior
No errors, gave no errors in mypy 1.6.1 release
Actual Behavior
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: