-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pep8 ification #7
Pep8 ification #7
Conversation
Fix whitespace Shorten long lines Use print() function Add doc strings Replace single-letter variable names Define main() function Add TODOs for more changes
Order of imports
Since "b" is now "idx_rigt", adjust "b_out" to "out_rigt". Since "i" is now "idx_curr", adjust "last" to "out_curr"
Lowercase variable names for non-constant variables Replace "if len(...) == 0", "if a == False" or "if a == None"
the flush=True argument to print() was only added with py3.3
Feel free to criticize, otherwise I will merge this in a few days |
@christian-intra2net , go for it. But the tests are failing because they are now picking a different shared library? |
LGTM for merge as for wrong library, there's unfinished PR: #4 it was never finished |
Well, PR#4 (I just saw it) is really "hand hurts, cut hand". Perhaps this can be fixed using {,DY}LD_LIBRARY_PATH... so that the file we are testing can find and use the local libmagic. |
The python source code did not comply with python coding standards. Ran the pep8 and pylint static code checkers on all python source files (except threadpool and progressbar which have nothing to do with file(1) functionality). Fixed most of the regressions reported. Mainly:
This should simplify moving to python3 (py2 support ends 2020)