mypy can't find type hints when importing blackpy.typed file to make black [PEP-561-compatible]black to [typeshed] or see my [StackOverflow question] for how I worked around this from the user's side (create py.typed in site-packages/black)I've briefly looked into this. Being unfamiliar with PEP-561, I might be wrong so take this with a grain of salt. It looks like it's not possible to add py.typed without reorganizing the repo layout a bit. We'd need to create a black package, move black.py into black/__init__.py and create black/py.typed. At that point it would make sense to move blib2to3 into black/blib2to3 too.
That's correct, PEP 561 only supports packages, not single-module libraries like Black.
Are there any particular benefits of having black not be a package?
Please follow #1350 for the discussion about refactor of black.py into a black/ package.
Most helpful comment
Are there any particular benefits of having black not be a package?