Closed giannitedesco closed 3 years ago
I committed my preferred formatting and added a comment explaining __all__
's purpose. I'm happy to merge this now. I was a bit curious about why mypy needed __all__
though, so I looked up the error it produces without the definition (error: Module 'dataclassy' does not explicitly export attribute 'dataclass'; implicit reexport disabled
). Strangely, searching for generic parts of the string (e.g. "implicit reexport disabled") only brings up two results, both of them from mypy's repository itself. I thought this would be a very common problem.
Description of changes
All that needs to be done is to add a "py.typed" file to the package, since adequate type annotations exist in all of the dataclassy code.
Testing
I installed the package locally and checked the following program with
mypy --strict
and it failed in the same way that dataclasses fails when the mypy dataclasses plugin is disabled.Gives the following error:
Which means that: