How to specify in the settings to run with a `-p` flag?
See original GitHub issueError:
error: Source file found twice under different module names:
A working solution for a command line Mypy usage:
https://github.com/python/mypy/issues/8944#issuecomment-678725333
Question:
The solution works when I run Mypy from a command line. E.g.:
python -m mypy -p src -p tests
How to pass the -p
flag in the βargsβ settings section?
args: [--no-strict-optional, --ignore-missing-imports, --package]
<-- does not work:
Package name βsrc/foobar/spameggs.pyβ cannot have a slash in it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Tutorial for using feature flags in a .NET Core app
Integrate with App Configuration when you're using it to manage feature flags. Set up feature management. To access the .NET Core featureΒ ...
Read more >AP with Flag ID | Wireless Access - Airheads Community
The I flag can be caused by a number of things, but most of them show up under profile-errors. Check to make sure...
Read more >Using AWS AppConfig Feature Flags
Click Create environment and you should be taken back to the Start deployment screen where your new Environment will be pre-selected. Here, forΒ ......
Read more >port flag settings sometimes don't seem to work on VMAX with ...
When I ran a "symaccess -sid xxx show clustername -type init -detail" I can see that the override flags are set as they...
Read more >Flag - Atlassian Developer
Flags are the primary method for providing system feedback in the product user interface. Messages include notifications of various kinds: alerts,Β ...
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
Thank you. Iβve tried your code above but still had issues:
src/utils/foobar.py: error: Source file found twice under different module names: 'backend_data.src.common' and 'src.common'
I investigated further and here is my working solution:
Having the same issue, using namespace packages. Per Guidoβs comment here https://github.com/python/mypy/issues/8944#issuecomment-678725333 if we want to use mypy on namespace packages it ONLY works with
-p companyname.package_name
. But the problem is thatpre-commit
by default passes in a list of files to be checked, and that results in this error for me:Is there a way to use the
-p
option?Files layout:
setup.cfg
.pre-commit-config.yaml