Improve ast types; revert several "redundant numeric union" changes from #7906 (#9130)

* Adapt number types in ast

Since mypy  0.990 type promotions was limited.
This means that complex is not longer promoted to int/float, therefore
we should adapt the types to list all possible types

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
kasium
2022-11-14 10:41:23 +01:00
committed by GitHub
parent 892bc0283a
commit f9cd5ee859
7 changed files with 10 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ if sys.version_info >= (3, 8):
def __init__(cls, *args: object) -> None: ...
class Num(Constant, metaclass=_ABC):
value: complex
value: int | float | complex
class Str(Constant, metaclass=_ABC):
value: str