ruff
157cae3c - [ty] Honor inline ignores on mismatched ParamSpec components (#30595)

Commit
4 hours ago
[ty] Honor inline ignores on mismatched ParamSpec components (#30595) When `**kwargs` is annotated with `P.kwargs`, the matching `*args` annotation must be `P.args`. We emit a diagnostic on `P.args` as a result -- but if you add a suppression comment to that line... a new diagnostic pops up on `P.kwargs`! That's not how suppression comments are really meant to work. This PR fixes that. ## Test plan ### Before (`aa46aae60`) Adding `# ty: ignore[invalid-paramspec]` on the `*args` line moves the diagnostic to `**kwargs`. https://github.com/user-attachments/assets/50ee1858-8126-45bb-896f-2517b98950fe ### After (`684c14273`) Adding the same ignore clears the diagnostic. https://github.com/user-attachments/assets/0a7fc2b0-ffd0-49b4-87ae-714835b7421f
Author
Parents
Loading