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
When using --strict-equality, the following program produces a false positive error, since Type[Any] should overlap with all type objects:
--strict-equality
Type[Any]
from typing import Any data: Any = [] # Non-overlapping container check (element type: "Type[Any]", container item type: "ABCMeta") print(type(data) in [dict, list]) # True
cc @ilevkivskyi
The text was updated successfully, but these errors were encountered:
Treat Type[Any] as builtins.type with --strict-equality (#7824)
92f9429
Fixes #7823 This makes `Type[object]`, `Type[Any]`, and `type` behave the same way w.r.t. type overlaps.
Successfully merging a pull request may close this issue.
When using
--strict-equality
, the following program produces a false positive error, sinceType[Any]
should overlap with all type objects:cc @ilevkivskyi
The text was updated successfully, but these errors were encountered: