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

Handle shebang (#!) lines #17

Open
corranwebster opened this issue Nov 9, 2020 · 0 comments
Open

Handle shebang (#!) lines #17

corranwebster opened this issue Nov 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@corranwebster
Copy link

Code with an executable escape at the start does not validate correctly. Eg.

#! /usr/bin/env python

# (C) Copyright 2005-2020 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!

gives an error H103 Wrong copyright header found.

This occurs mainly in example and demo files which are intended to be run stand-alone (although, as an aside, many of these don't have the execute flag set as would be needed to make the shebang work).

For reference, although the shebang is a Unix convention, Python provides support for the most common patterns on Windows. See https://docs.python.org/3/using/windows.html#shebang-lines

It may be sufficient to optionally allow #! /usr/bin/env python #! /usr/bin/env python3 to precede the copyright header, as all other shebang lines are almost certainly not what we would want for demos.

@corranwebster corranwebster added the enhancement New feature or request label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant