Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYI019 panics for classes with positional-only, but no non-positional arguments #6349

Closed
charliermarsh opened this issue Aug 4, 2023 · 0 comments · Fixed by #6350
Closed
Labels
bug Something isn't working

Comments

@charliermarsh
Copy link
Member

Reported in Discord.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 4, 2023
charliermarsh added a commit that referenced this issue Aug 4, 2023
## 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 #6349.

## Test Plan

`cargo test` (verified that `main` panics on the new fixtures)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant