Update documentation to reflect type:ignore changes#3121
Conversation
| line before any Python code: | ||
|
|
||
| ```python | ||
| # ty: ignore[invalid-argument-type] |
There was a problem hiding this comment.
Is it critical here that there's a blank line between this and any Python code? Like is this different than:
# ty: ignore[invalid-argument-type]
sum_three_numbers(3, 2, "1")There was a problem hiding this comment.
No, as long as there is nothing before it, it's a file-wide suppression comment either way. And we don't support previous-line suppression comments.
I suspect this formatting is just to emphasize that it's not a previous-line suppression comment. It's a bit unfortunate how easily it could look like one, though in real code it's probably not an issue, since there will likely be new lines, an import block, etc.
| line before any Python code: | ||
|
|
||
| ```python | ||
| # ty: ignore[invalid-argument-type] |
There was a problem hiding this comment.
No, as long as there is nothing before it, it's a file-wide suppression comment either way. And we don't support previous-line suppression comments.
I suspect this formatting is just to emphasize that it's not a previous-line suppression comment. It's a bit unfortunate how easily it could look like one, though in real code it's probably not an issue, since there will likely be new lines, an import block, etc.
Summary
Update the documentation to reflect the changes introduced in astral-sh/ruff#24096