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 support for using the library with mypy #18

Closed
ZeeD opened this issue Jan 18, 2024 · 5 comments
Closed

Add support for using the library with mypy #18

ZeeD opened this issue Jan 18, 2024 · 5 comments

Comments

@ZeeD
Copy link
Contributor

ZeeD commented Jan 18, 2024

At the moment if I import your module I have

error: Skipping analyzing "yaml_settings_pydantic": module is installed, but missing library stubs or py.typed marker  [import-untyped]
@acederberg
Copy link
Owner

Hi @ZeeD!

Thank you for using this library. I've reproduced this error in nvim. I'll take care of this. I'm currently occupied but I can get it done. It looks like I just need to add this

[tool.setuptools.package-data]
"pkgname" = ["py.typed"]

to pyproject.toml and add py.typed to the source folder and it should be good to go.

@acederberg
Copy link
Owner

I added the above and installed the package in editable mode and it works in nvim:

image

Changes are on fix/py-typed. Let me know that it works for you and I'll merge and release it.

@ZeeD
Copy link
Contributor Author

ZeeD commented Jan 20, 2024

Hi @acederberg !
thanks for the quick response and the changes!
yeah, it should be good with just the py.typed in the published package

@qs5779
Copy link
Contributor

qs5779 commented Jul 15, 2024

I am not sure why the fix/py-typed branch was never merged, but I just submitting a similar PR

@acederberg
Copy link
Owner

I thought I had fixed this, sorry @ZeeD! It is now merged in tag 2.3.1.

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

No branches or pull requests

3 participants