Remove useless or unused shebang lines #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit removes shebangs (
#!
) from non-script sources.These files have no
if __name__ == "__main__"
or similar and no interesting side effects. They are only meant to be imported. Therefore, a shebang line is not useful.The second commit removes shebangs from non-executable scripts.
These could use a shebang line, but the executable bit is not set, so it will never be useful.
Leaving the shebang lines and making the files executable would be an alternative, but it doesn’t seem necessary:
For
setup.py
, the traditional invocation is something likepython3 setup.py …
, and this will work fine without a shebang.For
hybridizer/shybrid.py
, end-users will run the entry point scriptshybrid
generated by setuptools instead, and developers can still runPYTHONPATH="${PWD}" python3 hybridizer/shybrid.py
orPYTHONPATH="${PWD}" python3 -m hybridizer.shybrid
if they like.