Skip to content

A method with no parameter gets a wrong error message saying argument instead of parameter #20939

@hyperkai

Description

@hyperkai

*Notes:

  • mypy test.py
  • mypy 1.19.1
  • Python 3.14.0

A method with no parameter gets the wrong error message saying argument instead of parameter as shown below:

class Cls:
    def meth(): ...
# Error

error: Method must have at least one argument. Did you forget the "self" argument?

So, the error message should say parameter as shown below:

error: Method must have at least one parameter. Did you forget the "self" parameter?

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