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

Local mkdocs issues #72

Open
msto opened this issue Oct 15, 2024 · 1 comment
Open

Local mkdocs issues #72

msto opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@msto
Copy link
Collaborator

msto commented Oct 15, 2024

mypy fails locally with the following:

$ poetry run mypy .
site/scripts/gen_ref_pages.py: error: Duplicate module named "gen_ref_pages" (also at "./docs/scripts/gen_ref_pages.py")
site/scripts/gen_ref_pages.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
site/scripts/gen_ref_pages.py: note: Common resolutions include: a) using `--exclude` to avoid checking one of them, b) adding `__init__.py` somewhere, c using `--explicit-package-bases` or adjusting MYPYPATH
Found 1 error in 1 file (errors prevented further checking)
@clintval
Copy link
Member

You're overriding the path(s) for MyPy with the ., instead do:

poetry run mypy

If you drop the local path then MyPy will default to the following directories:

files = ["prymer", "tests"]

Alternatively we could tell MyPy what to exclude instead of include:

https://mypy.readthedocs.io/en/stable/config_file.html#confval-exclude

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