Skip to content

Too many positional arguments to bound method: expected 0, got 0 #290

Closed
astral-sh/ruff
#18098
@InSyncWithFoo

Description

@InSyncWithFoo

Minimal reproducible example (playground):

class A:
    def foo(): ...  # No `self`

A().foo()  # Too many positional arguments to bound method `foo`: expected 0, got 0

Arguably, the "got 0" part should be "got 1 (including self)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcallsIssues relating to call-signature checking and diagnosticsdiagnosticsRelated to reporting of diagnostics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions