androwarn icon indicating copy to clipboard operation
androwarn copied to clipboard

Remove shebang

Open fabaff opened this issue 5 years ago • 3 comments

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}

fabaff avatar Dec 26 '19 22:12 fabaff

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.

maaaaz avatar Jan 05 '20 12:01 maaaaz

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.

fabaff avatar Jan 05 '20 21:01 fabaff

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

maaaaz avatar Jan 06 '20 20:01 maaaaz