Demo of microsoft/pyright#1782 with custom wrapper.
Adding __dataclass_transform__
in .pyi
.
Expected output:
+ ./mypy test.py
test.py:9: note: Revealed type is 'def (self: builtins.object)'
+ ./pyright test.py
No configuration file found.
No pyproject.toml file found.
stubPath /home/alexford/pyright_test_attrs/typings is not a valid directory.
Assuming Python platform Linux
Searching for source files
Found 1 source file
/home/alexford/pyright_test_attrs/test.py
/home/alexford/pyright_test_attrs/test.py:9:13 - info: Type of "Data.__init__" is "(self: Data, a: str, b: int) -> None"
0 errors, 0 warnings, 1 info
Completed in 0.786sec