-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
AttributeError: attribute 'arguments' of 'FuncDef' undefined #11449
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
Comments
This might happen because sometimes Lines 756 to 758 in e324460
It might happen after |
I too have suddenly started seeing this with mypy 0.931 (Python 3.7 on Ubuntu). Setting |
@domdfcoding please, report a new issue about your case 🙂 |
I'm getting the same error, and can reproduce with mypy 0.950 (Python 3.10.2, Windows) and the following stubs: stubs\foo.pyi class Foo:
def config(self, **foo): ... stubs\bar.pyi from foo import Foo
class Bar(Foo):
def config(self, baz: str = ...): ... mypy config in pyproject.toml [tool.mypy]
mypy_path = "stubs" Command: Output:
When run with command
and using master:
|
I have a PR open which fixes (I beleive) this issue: #12324 |
also hitting this -- a |
Should hopefully be fixed by #12324 (let me know if anybody can still reproduce the issue on master!) |
I was getting this error
with mypy 0.950, Python 3.8.13, and MacOS Ventura (13.5.1). Deleting the mypy cache (the folder |
that is a very old version of mypy |
@AlexWaygood Yes, I know, but there are systems that use old dependencies, and sometimes it's not easy or possible to update them. In our case, we will be updating this dependency soon, but still I wanted to point out the issue still occurs with that mypy version and how I solved it.
|
there was a bug in mypy's logic for deserialising objects from the mypy cache. the bug was fixed over a year ago in #12324. |
Using a development mypy version: 0.920+dev.5703becbbe9be5006ed0d2d998dd4a793f1aedd0
Code similar to:
Causes an internal error:
I tried to reduce the example, but it cutting it down to a minimal reproducer turned out to be complicated, after some changes it no longer appears. Let me know if you need a better reproducer and I'll see what I can do.
Your Environment
The text was updated successfully, but these errors were encountered: