python-varname icon indicating copy to clipboard operation
python-varname copied to clipboard

Add mypy compatibility

Open elliotgunton opened this issue 1 year ago • 1 comments

👋 Hey, we're planning to use varname in https://github.com/argoproj-labs/hera to extract python variable names to use in yaml output.

I was trying it out but get this error when linting with mypy

$ poetry run mypy -p hera
src/hera/workflows/_meta_mixins.py:15: error: Skipping analyzing "varname": module is installed, but missing library stubs or py.typed marker  [import-untyped]
src/hera/workflows/_meta_mixins.py:15: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 124 source files)

I think all you need is a py.typed file in the varname package - https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages - as you have type hints throughout the codebase already! 🚀 cc @flaviuvadan @samj1912

elliotgunton avatar Apr 29 '24 13:04 elliotgunton

Mind submitting a PR?

pwwang avatar Apr 30 '24 00:04 pwwang