Skip to content

New semantic analyzer: Namespace package with __init__.py breaks analysis #7029

Open
@fireundubh

Description

@fireundubh

I'm getting a lot of errors reported that are not errors.

  • Classes are reported as invalid types
  • Calls to methods are reported as modules not having those attributes
  • Instances of classes are reported as modules not callable
  • Types passed to, e.g., isinstance are reported as incompatible type Module (suggests that all custom types are treated as type Module)
  • Base classes are reported as invalid base classes
  • Calls to instances of classes are reported as not having the specified attributes
  • Package imports in __init__.py are reported as already defined

I am not sure whether these are issues are caused by the new semantic analyzer or by the Mypy plugin for PyCharm which has not been updated yet.

In comparison, with the new semantic analyzer disabled, there are no errors. The application works correctly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions