Closed
Description
The question is basically in the header.
Why is this an error:
count: str = 1000 # expression has type "int", variable has type "str"
and this is not:
class Counter:
def __init__(self):
self.count: str = 1000
c = Counter()
I have the latest mypy as of today:
mypy 0.740
├── mypy-extensions 0.4.3
├── typed-ast 1.4.0
└── typing-extensions 3.7.4.1
Metadata
Metadata
Assignees
Labels
No labels