Are there any ways to resolve a conflict with E402 and a shebang line without disabling it? #5425
Closed
Jarmos-san
started this conversation in
General
Replies: 1 comment 1 reply
-
Do you mind including a minimally reproducible example, just to make sure there's no misunderstanding in the issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I work with a bunch of executable Python scripts and all the scripts has a shebang line (
#!/usr/bin/env Python3
). That line is followed by a "module docstring" and the module imports. But Ruff flags this usage with the E402 error message since it expects the modules to be placed higher up on the file. Unfortunately that isn't a possibility because without the shebang lines the scripts can potentially break.So, are there any way around resolving this conflict without necessarily disabling the E402 message?
Beta Was this translation helpful? Give feedback.
All reactions