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
ListAttribute(of=UnicodeAttribute)
List[str]
They should be equivalent, but mypy/pylance did not agree with this.
To reproduce:
thing = ListAttribute(of=UnicodeAttribute)
the_thing: List[str] = model.thing
This seems to be an issue with ListAttribute not properly extracting types, to add to this, consider the following:
ListAttribute
the_first_thing: str = model.thing[0] This will cause "UnicodeAttribute" is incompatible with "str"
the_first_thing: str = model.thing[0]
"UnicodeAttribute" is incompatible with "str"
However, if the attribute is only UnicodeAttribute, then it will be recognized as str when assigned to a variable.
UnicodeAttribute
str
The text was updated successfully, but these errors were encountered:
Similarly, when trying to set the array, the same type error is raised.
Argument of type "list[str]" cannot be assigned to parameter "value" of type "List[UnicodeAttribute] | Attribute[List[UnicodeAttribute]]......
Sorry, something went wrong.
No branches or pull requests
They should be equivalent, but mypy/pylance did not agree with this.
To reproduce:
thing = ListAttribute(of=UnicodeAttribute)
the_thing: List[str] = model.thing
This seems to be an issue with
ListAttribute
not properly extracting types, to add to this, consider the following:the_first_thing: str = model.thing[0]
This will cause
"UnicodeAttribute" is incompatible with "str"
However, if the attribute is only
UnicodeAttribute
, then it will be recognized asstr
when assigned to a variable.The text was updated successfully, but these errors were encountered: