-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove shebang from non-executable files in torch.distributed #27285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
xuhdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shebangs might be used to indicate they must run on Python 3, not Python 2
|
right, they are used to indicate codes run on python3 only |
|
IIUC, this shebang won't print warning or error messages even if it is executed using PY2. If the shebang is only used for documentation purpose, shall we just use normal comments instead? I checked how jit handled this. Instead of adding a shebang, |
|
I agree -- the hash bang is an intent to make a file executable. @mrshenli Can you stamp this one? |
|
@mrshenli A normal comment is fine. I'm just pointing out that using shebang is one kind of convention. You can also enable lint checks against such style in |
According to pytorch#27285 , seems we do not intend to use shebang as an indication of Python version, thus we enable EXE001 flake8 check. For violations, we either remove shebang from non-executable Python scripts or grant them executable permission.
Summary: According to #27285 , seems we do not intend to use shebang as an indication of Python version, thus we enable EXE001 flake8 check. For violations, we either remove shebang from non-executable Python scripts or grant them executable permission. Pull Request resolved: #27560 Differential Revision: D17831782 Pulled By: ezyang fbshipit-source-id: 6282fd3617b25676a6d959af0d318faf05c09b26
Summary: Pull Request resolved: pytorch#27285 Test Plan: Imported from OSS Differential Revision: D17808207 Pulled By: pietern fbshipit-source-id: 6141c1783e3a6f448a298275120db1f254b42b2a
Summary: According to pytorch#27285 , seems we do not intend to use shebang as an indication of Python version, thus we enable EXE001 flake8 check. For violations, we either remove shebang from non-executable Python scripts or grant them executable permission. Pull Request resolved: pytorch#27560 Differential Revision: D17831782 Pulled By: ezyang fbshipit-source-id: 6282fd3617b25676a6d959af0d318faf05c09b26
Stack from ghstack:
Differential Revision: D17808207