-
Notifications
You must be signed in to change notification settings - Fork 219
Closed as not planned
Closed as not planned
Copy link
Labels
suppressionRelated to supression of violations e.g. ty:ignoreRelated to supression of violations e.g. ty:ignore
Description
Summary
Ty doesn't like this block of code in docstring-adder: https://github.com/astral-sh/docstring-adder/blob/1c87636f0f9b3a5f711c645a6cb0b181f7781464/add_docstrings.py#L234-L265
It complains:
warning[invalid-ignore-comment]
--> add_docstrings.py:243:47
|
241 | new_body = libcst.IndentedBlock(
242 | body=[libcst.SimpleStatementLine(body=[docstring_node])],
243 | # but preserve `# type: ignore` comments
| ^ Invalid `type: ignore` comment: no whitespace after `ignore`
244 | header=updated_node.body.trailing_whitespace,
245 | )
|
A minimal repro of this is:
# make sure to preserve `# type: ignore` comments here:
preserve_the_type_ignore_comments()from my perspective as a human, it feels obvious that this is not intended to be a type: ignore comment that a tool like ty is meant to parse and recognize :-)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
suppressionRelated to supression of violations e.g. ty:ignoreRelated to supression of violations e.g. ty:ignore