Avoiding "Duplicate module"
See original GitHub issueIf you have two modules with the same name in the project (but in different packages!) this hook will fail with --all-files
supposingly because pre-commit
will pass a list of individual files there.
Not sure what the proper solution should be but it seems like a good idea to have something like --all-files=./folder
on the hook runner side allowing the user to pass a folder there or maybe an extra option in the hook definition for that dir.
https://github.com/python/mypy/issues/4008#issuecomment-434869336
pre-commit run-test: commands[0] | python3 -m pre_commit run mypy --all-files -v
[mypy] mypy..............................................................Failed
hookid: mypy
octomachinery/app/action/config.py: error: Duplicate module named 'config' (also at 'octomachinery/app/server/config.py')
@asottile what do you think?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Remove duplicate modules in JavaScript bundles - GTmetrix
To fix this audit, use a tool like webpack-stats-duplicates to identify duplicate modules. Learn more about removing duplicate modules from your JavaScript ...
Read more >Anti-Duplicates | Drupal.org
Anti-Duplicates is a module that helps you avoid duplicate content on your website by displaying possible "duplicates" for the content you ...
Read more >How to avoid duplicates in custom modules - Zoho Cares
You can make use of insertRecords API method with duplicate check parameter by enabling "Do not allow duplicate values" in the respective Custom...
Read more >How to avoid duplicate code when using similar SDKs
The solution — Gradle to the rescue · Copy the file to the Amazon directory ( src/amazon/java/org/onebusaway/android/map/googlemapsv2 ) · Replace all Google ...
Read more >Useful modules to fix duplicate content in Drupal - Drudesk
Here is another module to avoid duplication on node titles. This Drupal 7 module is at the pre-release stage for Drupal 8. During...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
but, if you want what you’re suggesting, there’s already a way to do that:
for example
this is usually due to mypy not really understanding PEP420 namespaces – usually the fix is to add
__init__.pyi
or__init__.py
files