Skip to content

Method as variable inside class fail to count parameters #18438

Closed
@Polandia94

Description

@Polandia94

Bug Report

if a varible inside a class is a method of other class, when you call it has problems counting the parameters

(A clear and concise description of what the bug is.)

To Reproduce

https://mypy-play.net/?mypy=latest&python=3.12&gist=75f641be99916a76f9c9113fe99cd78d

Expected Behavior

The program run correctly ( on runtime or in pyright works fine)

Actual Behavior

mypy counts the second method as another self.

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