Skip to content

--check-untyped-defs required to check any imported class init #8775

Closed
@kyprifog

Description

@kyprifog

Note: if you are reporting a wrong signature of a function or a class in
the standard library, then the typeshed tracker is better suited
for this report: https://github.com/python/typeshed/issues

Please provide more information to help us understand the issue:

  • Are you reporting a bug, or opening a feature request?
  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.
  • What is the actual behavior/output?
  • What is the behavior/output you expect?
  • What are the versions of mypy and Python you are using?
    Do you see the same issue after installing mypy from Git master?
  • What are the mypy flags you are using? (For example --strict-optional)
  • If mypy crashed with a traceback, please paste
    the full traceback below.

Bug?

Using the default example found here for classes:
https://mypy.readthedocs.io/en/stable/class_basics.html#class-basics

I get the same result, however if I import A into another class "--check-untyped-defs" is required to detect the same errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions