what file do I need to specify that my python library is type-hinted?
- User
what file do I need to specify that my python library is type-hinted?
- Assistant
Add a file called
codeyour_package/py.typedThat’s it. 🥳
Why it matters
PEP 561 says that if a wheel/sdist contains a marker file named
py.typed, type checkers (mypy, pyright, pyre, etc.) can trust that the inline.pyfiles in that package have type hints.What to put inside
• Usually nothing – an is fine. • Optionally the single word
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.