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

Mypy fails to find jsonargparse type hints #151

Closed
psirenny opened this issue Jul 25, 2022 · 2 comments · Fixed by #152
Closed

Mypy fails to find jsonargparse type hints #151

psirenny opened this issue Jul 25, 2022 · 2 comments · Fixed by #152
Labels
bug Something isn't working

Comments

@psirenny
Copy link
Contributor

🐛 Bug report

Mypy command can't find jsonargparse library types:

mypy --namespace-package --explicit-package-bases model

Screen Shot 2022-07-25 at 10 24 38 AM

To resolve

Adding a blank py.typed file to the jsonargparse module resolves the error (locally). See py-typed marker file.

Environment

@psirenny psirenny added the bug Something isn't working label Jul 25, 2022
@mauvilsa
Copy link
Member

@psirenny will you open a pull request for this? Apart from adding the py.typed file, the [options.package_data] section in setup.cfg needs to be updated so that the file gets included in the whl package.

psirenny added a commit to psirenny/jsonargparse that referenced this issue Jul 25, 2022
Add mypy **py.typed** marker file.
@psirenny
Copy link
Contributor Author

I created a pull request here: #152.

@psirenny psirenny changed the title Mypy fails to find jsonargparse typedefs Mypy fails to find jsonargparse type hints Jul 25, 2022
mauvilsa pushed a commit that referenced this issue Jul 25, 2022
Add mypy **py.typed** marker file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants