-
Notifications
You must be signed in to change notification settings - Fork 94
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
Dev clean lint #36
base: master
Are you sure you want to change the base?
Dev clean lint #36
Conversation
Define max line-length to 120 to be compatible with PyCharm default settings. Flake 8 : Ignore E203 whitespace before ':' due to false positive related to slice notation. Fix E501 line too long. Fix F841 local variable 'e' is assigned to but never used. Fix F401 'StatusType' imported but unused Fix F841 local variable is assigned to but never used Fix E712 comparison to False should be 'if cond is False:' or 'if not cond:'. Fix E231 missing whitespace after ',' PyLint : Fix E1101: Instance of 'Exception' has no 'status_code' member (no-member)
Fix PyLint W0212: Access to a protected member _options of a client class (protected-access)
Fix PyLint W0102: Dangerous default value {} as argument (dangerous-default-value)
Fix PyLint W0622: Redefining built-in (redefined-builtin)
Fix PyLint W1201: Use lazy % formatting in logging functions (logging-not-lazy) Fix PyLint W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
Separate standard module, external module and current module imports. Reorder in alphabetical order each categories. Fix PyLint C0411: standard import should be placed before user import (wrong-import-order)
Fix PyLint W1505: Using deprecated method warn() (deprecated-method)
Fix PyLint R0205: Class class inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
Fix PyLint R0201: Method could be a function (no-self-use).
Fix PyLint R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
Fix PyLint W0621: Redefining name from outer scope (redefined-outer-name) According to Pytest documentation : If a fixture is used in the same module in which it is defined, the function name of the fixture will be shadowed by the function arg that requests the fixture; one way to resolve this is to name the decorated function fixture_<fixturename> and then use @pytest.fixture(name='<fixturename>')
Fix PyLint R1720: Unnecessary "else" after "raise" (no-else-raise) Fix PyLint R1720: Unnecessary "elif" after "raise" (no-else-raise)
Fix PyLint W0612: Unused variable (unused-variable)
Fix PyLint C0103: Variable name doesn't conform to snake_case naming style (invalid-name) According to PyLint documentation, the following name are accepted : i,j,k,ex,Run,_ Use explicit name when possible.
Other than PyLint and I having creative differences about organising imports (which probably don't matter), I'm a worried this is quite a big patch and will cause other live branches a lot of rebase type problems. Wondering if we could do the following:
I hope this doesn't create a ton of new work. I'm really grateful for the PR and the work going into improving code quality! |
I'm pretty sure most of the works will rebase fine 😃 |
I have done the cleaning from Pylint output.
I am currently regarding the missing docstring but I will commit it later because it takes time.
I have choiced the default PyCharm line length (120 characters) and it seems to fit well with the current code base.