-
Notifications
You must be signed in to change notification settings - Fork 103
Add UTF-8 encoding header to Python scripts. #904
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
|
It might be interesting to note that a couple of scripts have some different encoding specified, but those seem to have been added all at once as part of some third-party thing, so I left those alone. Also, there are some escaped unicode characters in one script, but they seem to relate to kinds of whitespace (especially linebreaks) so I left them escaped. |
|
Some files are missing the coding header (tested on the latest dev_4_4 merge checkout): |
|
Also there's an interesting variety of alternative though is this best left for a separate cleanup? |
|
Yeah, there's a ton missing, I wonder if I pushed the wrong thing. Will re-check with latest and re-push the comprehensive one... |
|
If we are checking every python file at once, fixing the shebang is probably also appropriate. We'll just need to do the same with a script on develop to pick up any files which didn't exist there. |
|
Okay, hopefully pushed the right one this time. |
|
I'm just trying to get ome/omero-documentation#245 finished up (-: but if you can confidently say how the shebangs should be fixed I can do that too. The one in |
|
|
|
Will push that today. |
|
This looks fine to me. Should the scripts repo also be changed? |
|
@manics: I don't see why not. |
|
I'll fork it and take a look. |
|
There are a few files that don't have a shebang header line at all; I realized I'm probably supposed to add one. |
|
Okay, filed ome/omero-scripts#21 too. |
Is it strictly necessary for scripts that can't be directly executed? |
|
I figured it avoids people making a mistake about if a script is directly executable or not, and doesn't actually do any harm. |
|
OK. This is the list of py files missing a |
|
Thanks! Hopefully my latest commit caught these? Except, I did miss out most of the |
|
(Ah, yes, if I change your |
|
Oh yeah, I forgot about the empty files. |
|
Good to merge. |
|
👍 |
Add UTF-8 encoding header to Python scripts.
Add
-*- coding: utf-8 -*-headers widely and fix some EOLs at file endings.Arising from discussion of ome/omero-documentation#245