ruff
5e73345a - Avoid panic with positional-only arguments in `PYI019` (#6350)

Commit
2 years ago
Avoid panic with positional-only arguments in `PYI019` (#6350) ## Summary Previously, failed on methods like: ```python @classmethod def bad_posonly_class_method(cls: type[_S], /) -> _S: ... # PYI019 ``` Since we check if there are any positional-only or non-positional arguments, but then do an unsafe access on `parameters.args`. Closes https://github.com/astral-sh/ruff/issues/6349. ## Test Plan `cargo test` (verified that `main` panics on the new fixtures)
Author
Parents
Loading