mirror of https://github.com/astral-sh/ruff
## 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. |
||
|---|---|---|
| .. | ||
| mdtest | ||
| primer | ||
| README.md | ||
README.md
Markdown files within the mdtest/ subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs integration test.
See crates/ty_test/README.md for documentation of this test format.