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

Move py.typed to package root #3307

Merged
merged 4 commits into from
Sep 10, 2023
Merged

Move py.typed to package root #3307

merged 4 commits into from
Sep 10, 2023

Conversation

Andrew-S-Rosen
Copy link
Member

@Andrew-S-Rosen Andrew-S-Rosen commented Sep 9, 2023

When using mypy on packages that rely on Pymatgen, it often complains like follows:

Skipping analyzing "pymatgen.io.vasp.inputs": module is installed, but missing library stubs or py.typed marker

Since pymatgen.io is such a commonly used module, let's add a py.typed there unless there's a reason to avoid doing so.

Is there a reason why it wasn't included? And should one be included in other directories (e.g. pymatgen.symmetry)?

@janosh janosh changed the title Add py.typed to pymatgen.io Move py.typed to package root Sep 10, 2023
@janosh janosh added types Type all the things pkg Package health and distribution related stuff labels Sep 10, 2023
@janosh
Copy link
Member

janosh commented Sep 10, 2023

Since the goal is to add type hints all across pymatgen (although some areas still fall short), I moved the py.typed into the package root.

@janosh janosh merged commit 80a7a90 into materialsproject:master Sep 10, 2023
janosh added a commit that referenced this pull request Sep 14, 2023
* Update setup.py

Signed-off-by: Andrew S. Rosen <[email protected]>

* Create py.typed

* pre-commit auto-fixes

* move py.typed to root package

---------

Signed-off-by: Andrew S. Rosen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Janosh Riebesell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg Package health and distribution related stuff types Type all the things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants