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

Distribute types #18

Closed
cjolowicz opened this issue Feb 24, 2020 · 1 comment · Fixed by #140
Closed

Distribute types #18

cjolowicz opened this issue Feb 24, 2020 · 1 comment · Fixed by #140
Labels
enhancement New feature or request
Milestone

Comments

@cjolowicz
Copy link
Owner

cjolowicz commented Feb 24, 2020

Supply a py.typed marker file in the package directory, as described in PEP 561.

See also https://mypy.readthedocs.io/en/stable/installed_packages.html

@cjolowicz cjolowicz added the enhancement New feature or request label Feb 24, 2020
@cjolowicz
Copy link
Owner Author

cjolowicz commented Apr 18, 2020

This should also allow us to revert the addition of mypy_path, provided we also install the package into the Nox session for mypy.

Set mypy_path in the configuration file pointing it to the src directory.
This is required to avoid errors about missing imports related to your package
when mypy is invoked on files located outside of the package, such as modules in
the test suite. For example, pre-commit runs mypy on staged files only, so this
would be a common issue with our mypy pre-commit hook.

@cjolowicz cjolowicz linked a pull request Apr 18, 2020 that will close this issue
@cjolowicz cjolowicz added this to the 2020.5.15 milestone Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant