My name is Costin and I am a student in the third year at UCL. I am doing some improvements on Jedi, code completion for Python, as my final year project. I am messaging you because I need some help due to the reason that I believe that mypy is doing already what I need. I am trying to catch all the variables and their types from a Python source code. I have already tried to use mypy from terminal too see if I can catch them, but I wasn't successful.
If you want to guide me, it would be help me a lot.
Unexpected keyword argument “field" for “Dataclass”or
error:Too many arguments for “Dataclass”. Am I doing somthing or is this not yet supported with mypy?
To add a minimal example
from dataclasses import dataclass @dataclass class Dataclass: id: int name: str Dataclass(0, "Foo Corp.") Dataclass(id=0, name="Bar Corp.”)
test.py:1: error: Cannot find module named 'dataclasses' test.py:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help) test.py:10: error: Too many arguments for "Dataclass" test.py:12: error: Unexpected keyword argument "id" for "Dataclass" /Users/alex/.python_envs/test/lib/mypy/typeshed/stdlib/3/builtins.pyi:38: note: "Dataclass" defined here test.py:12: error: Unexpected keyword argument "name" for "Dataclass" /Users/alex/.python_envs/test/lib/mypy/typeshed/stdlib/3/builtins.pyi:38: note: "Dataclass" defined here