You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using it in one of my projects and recently wanted to migrate it to type hinting with mypy. Unfortunately, I failed, because appdirs doesn't provide type hints.
Could you either add type hints to appdirs.py, or alternatively, add a appdirs.pyi type stub file?
Thank you :)
The text was updated successfully, but these errors were encountered:
Inline typing might be a better fit, but, according to https://www.python.org/dev/peps/pep-0561/, you also would have to add the py.typed marker, which boils down to
convert the appdirs.py to an appdirs folder with a __init__.py
comment # type: ... everywhere
add a py.typed file in there
make sure that file is bundled within your wheel with some setuptools incantation, i.e
# py_modules=["appdirs"], # no need for this anymorepackage_data={"appdirs": ["py.typed"]},
packages=["appdirs"]
Great library, thanks.
I'm using it in one of my projects and recently wanted to migrate it to type hinting with mypy. Unfortunately, I failed, because appdirs doesn't provide type hints.
Could you either add type hints to appdirs.py, or alternatively, add a appdirs.pyi type stub file?
Thank you :)
The text was updated successfully, but these errors were encountered: