You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The —add-noqa breaks shebang lines with the D100 rule on files with no module documentation. Can the shebang line be ignored and the D100 error be assigned to the second line, if it exists?
Example output from ruff check --add-noqa --select D100 --isolated .:
If this script is marked executable, the noqa comment will be passed as a filename to python, which will crash the interpreter, since the file does not exist.
Keywords: shebang D100
Ruff version: 0.6.4
The text was updated successfully, but these errors were encountered:
CPY001, INP001 and other file-level rules seem to suffer from the same problem.
As a FYI, changing the location would be a breaking change for RyeCharm, which currently uses the value of the range to determine whether it should show an editor-level notice banner. Updating this logic is simple enough, though.
Yeah, it's certainly not ideal and thanks for the heads up for the RyeCharm integration.
We could consider detecting this in the fix loop but my worry is that it won't be possible to determine if the edit should be applied before or after the shebang line (e.g. what if an edit changes the shebang line). But maybe we can? By only applying said logic if its an insertion at offset 0 and a shebang line is present?
The
—add-noqa
breaks shebang lines with the D100 rule on files with no module documentation. Can the shebang line be ignored and the D100 error be assigned to the second line, if it exists?Example output from
ruff check --add-noqa --select D100 --isolated .
:If this script is marked executable, the noqa comment will be passed as a filename to python, which will crash the interpreter, since the file does not exist.
Keywords: shebang D100
Ruff version: 0.6.4
The text was updated successfully, but these errors were encountered: