mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 00:24:13 -05:00
## Summary Resolves [#290](https://github.com/astral-sh/ty/issues/290). All arguments, synthesized or not, are now accounted for in `too-many-positional-arguments`'s error message. For example, consider this example: ```python class C: def foo(self): ... C().foo(1) # !!! ``` Previously, ty would say: > Too many positional arguments to bound method foo: expected 0, got 1 After this change, it will say: > Too many positional arguments to bound method foo: expected 1, got 2 This is what Python itself does too: ```text Traceback (most recent call last): File "<python-input-0>", line 3, in <module> C().foo() ~~~~~~~^^ TypeError: C.foo() takes 0 positional arguments but 1 was given ``` ## Test Plan Markdown tests.