Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mypy compatibility #108

Closed
elliotgunton opened this issue Apr 29, 2024 · 1 comment · Fixed by #109
Closed

Add mypy compatibility #108

elliotgunton opened this issue Apr 29, 2024 · 1 comment · Fixed by #109

Comments

@elliotgunton
Copy link
Contributor

👋 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

@pwwang
Copy link
Owner

pwwang commented Apr 30, 2024

Mind submitting a PR?

elliotgunton added a commit to elliotgunton/python-varname that referenced this issue Apr 30, 2024
pwwang pushed a commit that referenced this issue May 3, 2024
* Create py.typed for mypy compatibility

Fixes #108

* Add to contributors

Signed-off-by: Elliot Gunton <elliotgunton@gmail.com>

---------

Signed-off-by: Elliot Gunton <elliotgunton@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants