-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome
Description
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 .:
#!/usr/bin/env python # noqa: D100
import sys
if __name__==‘__main__’:
print(sys.argv)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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcome