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

Fully type-annotate package #416

Open
4 tasks
jwodder opened this issue Nov 7, 2023 · 0 comments
Open
4 tasks

Fully type-annotate package #416

jwodder opened this issue Nov 7, 2023 · 0 comments

Comments

@jwodder
Copy link
Contributor

jwodder commented Nov 7, 2023

Running mypy on code that uses the latest version of nwbinspector fails with the error message "module is installed, but missing library stubs or py.typed marker". A quick look at nwbinspector's source indicates that it is making some use of type annotations, but a number of annotations are missing.

Please do the following:

  • Fully type-annotate all public items
  • Add a CI job to run mypy on the package, and ensure it passes
  • Add an empty file named py.typed inside src/nwbinspector/
  • Ensure that the src/nwbinspector/py.typed file is included in sdists & wheels built from the project. This may involve configuration specific to your build backend (setuptools) that is beyond the scope of this comment.
    • You can list the contents of an sdist (the dist/nwbinspector-{version}.tar.gz file created when building the project) by running tar ztf dist/nwbinspector-{version}.tar.gz on it.
    • You can list the contents of a wheel (a dist/nwbinspector-{version}-*-*-*.whl file created when building the project) by running zipinfo -1 dist/nwbinspector-{version}-*-*-*.whl on it.
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

1 participant