Skip to content

--untyped-calls-exclude does not work with super() #16653

Description

@bersbersbers

Bug Report

--untyped-calls-exclude does not work with super()

To Reproduce

class Super:
    def draw(self):
        ...

class Class(Super):
    def draw(self) -> None:
        super().draw()

Class().draw()

Expected Behavior

No error.

Actual Behavior

(.venv) C:\Build>mypy --no-incremental --disallow-untyped-calls --untyped-calls-exclude=bug --untyped-calls-exclude=bug.Super --untyped-calls-exclude=bug.Class bug.py
bug.py:7: error: Call to untyped function "draw" in typed context  [no-untyped-call]
Found 1 error in 1 file (checked 1 source file)

Your Environment

  • Mypy version used: 1.7.1.
  • Mypy command-line flags: see above
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: 3.12.1

Related: #16651

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions