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

fix(mypy): 1/2 mypy complains about conflicting main.py modules if we do not use unique names for the sample modules #2025

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

yesudeep
Copy link
Contributor

ERROR:

samples/coffee-shop/main.py: error: Duplicate module named "main" (also at "./samples/basic-gemini/main.py")
samples/coffee-shop/main.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
samples/coffee-shop/main.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

CHANGELOG:

  • Use the same structure as other packages with unambiguous names
    for entry point modules to avoid collisions to satisfy mypy.
  • Enable strict mypy checks by default; relax as necessary.

… do not use unique names for the sample modules

ERROR:
```
samples/coffee-shop/main.py: error: Duplicate module named "main" (also at "./samples/basic-gemini/main.py")
samples/coffee-shop/main.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
samples/coffee-shop/main.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
```

CHANGELOG:
- [ ] Use the same structure as other packages with unambiguous names
  for entry point modules to avoid collisions to satisfy mypy.
- [ ] Enable strict mypy checks by default; relax as necessary.
@yesudeep yesudeep merged commit eaac2e4 into main Feb 18, 2025
7 checks passed
@yesudeep yesudeep deleted the yesudeep/fix/false-veil branch February 18, 2025 21:03
@yesudeep yesudeep linked an issue Feb 18, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Py] Mypy reports several errors
2 participants