Skip to content

version 0.930 regression: INTERNAL ERROR AttributeError: attribute 'arguments' of 'FuncDef' undefined #11899

Closed
@arielf

Description

@arielf

Just sharing a regression I just hit on code that used to pass mypy before.

Unfortunately, updating from git is not an option in my env.

Line 273 in source I can't fully share is the first (def) line below which is one (override) method in a big class:

    def update(self,  # type: ignore
               name: Optional[str] = None,
               description: Optional[str] = None,
               metric: Optional[SyntheticObject] = None,
               category: Optional[UserDefinedObjectRequestcategoryEnum] = None,
               cacherefreshseconds: Optional[int] = None,
               refreshDataType: Optional[bool] = None,
               properties: Optional[ColumnParamsR] = None,
               keyEntity: Optional[str] = None,
               dataType: Optional[SomePrivateDataType] = None,
               initialCollection: Optional[str] = None) -> EntityProperty:

Stack trace when running mypy is:

.../entityproperty.py:273: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.930
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "mypy/checker.py", line 420, in accept
  File "mypy/nodes.py", line 727, in accept
  File "mypy/checker.py", line 770, in visit_func_def
  File "mypy/checker.py", line 781, in _visit_func_def
  File "mypy/checker.py", line 1469, in check_method_override
  File "mypy/checker.py", line 1497, in check_method_or_accessor_override_for_base
  File "mypy/checker.py", line 1583, in check_method_override_for_base_with_name
  File "mypy/checker.py", line 1745, in check_override
  File "mypy/messages.py", line 839, in signature_incompatible_with_supertype
  File "mypy/messages.py", line 861, in pretty_callable_or_overload
  File "mypy/messages.py", line 1937, in pretty_callable
AttributeError: attribute 'arguments' of 'FuncDef' undefined
.../entityproperty.py:273: : note: use --pdb to drop into pdb

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions