-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
"unable to merge overloads" reported from site-packages #12162
Comments
I'm experiencing the same issue. My project # pyproject.toml
[[tool.mypy.overrides]]
module = "kraken._vendor.dill.*"
ignore_errors = true
ignore_missing_imports = true But in the
You can find the CI here: https://github.com/kraken-build/kraken-wrapper/runs/7796703778?check_suite_focus=true And reproduce it locally with
Gives you
(Mypy 0.971) Sometimes I also see Mypy checking the site packages as if I passed them as paths to the CLI. I believe I see this mostly with the Mypy daemon though, and restarting it usually fixes it, so it may be slightly unrelated. Adding this config to [[tool.mypy.overrides]]
module = "kraken._vendor.dill.*"
ignore_errors = true Interestingly, adding |
Blocking errors are a bad user experience and there's no reason for this one to be one / there is another code path for invalid type ignores that is non-blocking. Fixes half of python#12299. The half it doesn't fix is that ideally users shouldn't be getting these warnings from third party libraries. Also see python#12162 (comment) But that's for another PR
Blocking errors are a bad user experience and there's no reason for this one to be one / there is another code path for invalid type ignores that is non-blocking. Fixes half of #12299. The half it doesn't fix is that ideally users shouldn't be getting these warnings from third party libraries. Also see #12162 (comment) But that's for another PR
Similar to NiklasRosenstein's example, there's also a case in |
Some anecdotal findings, I hit this issue in a container running my simply Python application in an image based on
and removing this errror kept spawning further errors in Changing base image to mypy version: |
Technically unrelated to this, see the pinned issue here #13627 |
* Remove --install-types flag * Remove --non-interactive flag * Pin Python version to avoid mypy-NumPy error See - python/mypy#13627 - python/mypy#12162
I'm encountering this error again, and I think it's because my project is compatible with Python 3.7+, but when it is installed in Python 3.10 it get's a newer version of its
The following does not fix it:
Pinning |
…<3.0.0` due to Mypy complaining about the newer syntax in Python 3.10 when a newer version of it would otherwise get installed (see python/mypy#12162)
Ah that's unfortunate. If your library still supports Python 3.7, one good way to test is to set up your Python 3.7 environment and run This will work, because |
Bug Report
MyPy is reporting problems with dependencies in site-packages.
To Reproduce
To be honest, I'm having trouble reproducing a minimal example I can share. I don't understand why it's reporting on site-packages in the first place.
Expected Behavior
MyPy should only tell me about errors in the code I tell it to check - not it's dependencies.
Actual Behavior
.venv/lib/python3.6/site-packages/ddtrace/internal/utils/__init__.py: error: Source file found twice under different module names: "ddtrace.internal.utils" and "ddtrace.internal.utils.__init__"
Your Environment
.venv
)mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: