You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
if not (is_dic_correct(frequencies, False, str, int | float) and my_isinstance(top, int) and top > 0):
Check types output:
lab_1_keywords_tfidf/main.py:186: error: Argument 3 to "is_dic_correct" has incompatible type "Type[str]"; expected "Union[int, float, str, Tuple[Any, ...]]" [arg-type]
lab_1_keywords_tfidf/main.py:186: error: Unsupported left operand type for | ("Type[int]") [operator]
The text was updated successfully, but these errors were encountered:
AndreyKarnauhov
changed the title
Vertical line instead of Union does not pass the types check
Vertical line in place of Union does not pass the types check
Oct 2, 2022
lab_2_keywords_cooccurrence/start.py:101: error: Unsupported left operand type for | ("Mapping[Tuple[str, ...], float]") [operator]
lab_2_keywords_cooccurrence/start.py:101: error: Unsupported left operand type for | ("None") [operator]
lab_2_keywords_cooccurrence/start.py:101: note: Both left and right operands are unions
I investigated the bug and found that the problem is in mypy - python/mypy#12392
And we just have to wait for a decision from the mypy project. The workaround I can suggest is just use Union instead of |
Example of a commit with this issue:
0da5b89
main.py line 186:
Check types output:
The text was updated successfully, but these errors were encountered: