Open
Description
opened on Nov 18, 2024
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
Activity