Skip to content
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

Remove shebang #26

Open
fabaff opened this issue Dec 26, 2019 · 3 comments
Open

Remove shebang #26

fabaff opened this issue Dec 26, 2019 · 3 comments

Comments

@fabaff
Copy link

fabaff commented Dec 26, 2019

Please remove the shebang from all files which don't need it.

For the Fedora package I have to:

sed -i -e '/^#!\//, 1d' androwarn/{__init__.py,androwarn.py,warn/*/*.py,warn/*/*/*.py}
@maaaaz
Copy link
Owner

maaaaz commented Jan 5, 2020

Hello @fabaff,
Thanks for reporting, but are you sure that a shebang is not needed in androwarn.py ?

It is the entry point, I doubt that it's not a good practice to specify it.
And overall, it is not a good practice to specify in each file, even if they are not directly called ?

Cheers.

@fabaff
Copy link
Author

fabaff commented Jan 5, 2020

Thanks for reporting, but are you sure that a shebang is not needed in androwarn.py ?

Yes, I am. androwarn will contain the shebang as this is the entry point for an installation. But if want to allow users to run it from a checkout then the shebang might be needed in androwarn.py.

And overall, it is not a good practice to specify in each file, even if they are not directly called ?

Those files never get called from the command-line thus not need for shebangs.

@maaaaz
Copy link
Owner

maaaaz commented Jan 6, 2020

Thanks for reporting, but are you sure that a shebang is not needed in androwarn.py ?

Yes, I am. androwarn will contain the shebang as this is the entry point for an installation. But if want to allow users to run it from a checkout then the shebang might be needed in androwarn.py.

Ok that's clear, indeed it is expected to also be able to run directly androwarn.py so this will be the only file with a shebang.

And overall, it is not a good practice to specify in each file, even if they are not directly called ?

Those files never get called from the command-line thus not need for shebangs.

Clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants