Closed
Description
I'm wondering which is the correct way of annotating __dict__
property. Dict[str, Any]
seem quite obvious and is used multiple times in typeshed, but:
from typing import Any, Dict
class Test:
@property
def __dict__(self) -> Dict[str, Any]:
return {}
% mypy test.py
test.py:5: error: Signature of "__dict__" incompatible with supertype "object"
Metadata
Metadata
Assignees
Labels
No labels