Resolve "Use pylint for linting"
Closes #239 (closed)
Linted through the code base and made small changes to various parts of the project.
NOTE: There are still some pylint warning messages disabled, this is either because:
- No obvious changes could be made to "improve" the standard of the code, or
- The changes that were made to address this message lead to build errors.
Using pylint
To lint the codebase run ./setup.py test --addopts '--pylint -m pylint'
- This will provide warnings when the linter comes across a potential error or style issue. They are generally relatively easy to fix/change.
- Please note that some warnings have been permanently disabled in the .pylintrc configuration file
- If the warning for a line of code is irrelevant disable it using:
# pylint: disable=<warning-name>
Merge request reports
Activity
added 1 commit
- d0e36d69 - minor modifications to buildstream/_pipeline.py
added 31 commits
-
d0e36d69...2e6566e2 - 5 commits from branch
BuildStream:master
- c8b8962b - Add pylint to CI
- e183724a - Add pylint exceptions
- df85ab7e - Fix bugs and style issues with pylint
- f285b95a - Delt with anomalous-backslash-in-string - STILL DISABLED
- 8f3a752d - pylint - delt with bad-continuation
- 913b63d9 - pylint - delt with broad-except + bare-except
- 57162c96 - pylint - delt with consider-merging-isinstance
- a77bb3a0 - pylint - delt with dangerous-default-value
- 76c77f69 - pylint - dealt with global-statement
- 18ca8aa9 - pylint - dealt with len-as-condition
- 26d67d7e - pylint - dealt with logging-format-interpolation
- 7bb75672 - pylint - disabled no-member error msg's
- 0cce3515 - pylint - dealth with superfluous-parens
- 424bfb58 - pylint - dealt with unidiomatic-typecheck
- 20c66f59 - pylint - dealt with wrong-import-order
- 97673ffd - pylint - wrong-import-position conflicts with wrong-input-order so disable
- a5f335ea - pylint - dealt with unnecessary-pass
- a412c3ee - pylint - dealt with redefined-argument-from-local
- 0b601a1c - pylint - dealt with redefined-builtin
- 1ddaa5ac - pylint - dealt with redefined-outer-name
- eb7fc6ee - pylint - dealt with simplifiable-if-statement
- 82c88985 - Removed changes made in 7f765f9e as this broke bst
- 28e4d532 - pylint - working version - most errors addressed
- ed95588a - Minor changes to stick with conventions
- a717a899 - minor modifications to buildstream/_pipeline.py
- dc2a24ef - disabled global-statement warnings where necessary and rectified import orders
Toggle commit list-
d0e36d69...2e6566e2 - 5 commits from branch
added 1 commit
- 72c40bc3 - Disabled bad exception warnings for Glib.GError's
added 15 commits
- 344ffdad - pylint - dealt with superfluous-parens
- f65026c9 - pylint - dealt with unidiomatic-typecheck
- 46d49e95 - pylint - dealt with wrong-import-order
- 7c3af6d9 - pylint - wrong-import-position conflicts with wrong-input-order so disable
- bf3e42c0 - pylint - dealt with unnecessary-pass
- c5116ea0 - pylint - dealt with redefined-argument-from-local
- 644dc260 - pylint - dealt with redefined-builtin
- beb7bb91 - pylint - dealt with redefined-outer-name
- 4fe41a2b - pylint - dealt with simplifiable-if-statement
- 389b5f1a - Removed changes made in 7f765f9e as this broke bst
- 4f7a80a1 - pylint - working version - most errors addressed
- c4b604ce - Minor changes to stick with conventions
- c61d2338 - minor modifications to buildstream/_pipeline.py
- 30555d99 - disabled global-statement warnings where necessary and rectified import orders
- 00ac29e2 - Disabled bad exception warnings for Glib.GError's
Toggle commit listCould do with the typos in commit messages being fixed. Would be better to rebase to squash "Removed changes made in 7f765f9e as this broke bst", particularly because if this patch series is rebased in that message will no longer work, but also for cleanliness it makes it a lot easier to read what the change was.
added 1 commit
- c8eb47bb - pylint: cleaned up some whitespace warnings and disabled cyclic-import
added 27 commits
- 04c2af8d - Dealt with anomalous-backslash-in-string warning - STILL DISABLED
- 57594967 - pylint - dealt with bad-continuation warning
- ac89f614 - pylint - dealt with broad-except and bare-except warnings
- 5e019705 - pylint - dealt with consider-merging-isinstance warnings
- ff463758 - pylint - dealt with dangerous-default-value warning
- 2d0963d3 - pylint - dealt with global-statement warning
- 2efc353f - pylint - dealt with len-as-condition warning
- 3d3b7903 - pylint - dealt with logging-format-interpolation warning
- b278b7ad - pylint - disabled no-member error msg's
- 44be43d8 - pylint - dealt with superfluous-parens warning
- c7a857dc - pylint - dealt with unidiomatic-typecheck warning
- 6951678a - pylint - dealt with wrong-import-order warning
- 34849271 - pylint - wrong-import-position conflicts with wrong-input-order so disable
- c636abc8 - pylint - dealt with unnecessary-pass warning
- 080e3e89 - pylint - dealt with redefined-argument-from-local warning
- 1060f5dc - pylint - dealt with redefined-builtin warning
- 556a5e2c - pylint - dealt with redefined-outer-name warning
- 1801d63c - pylint - dealt with simplifiable-if-statement warning
- c82db4fb - Removed changes made when dealing with undefined-outer-name warning as this broke bst
- b8297c0b - pylint - working version - most errors addressed
- e42e288e - minor changes to stick with conventions
- 6f9e75e4 - minor modifications to buildstream/_pipeline.py
- e6e19872 - disabled global-statement warnings where necessary and rectified import orders
- a7daa65e - disabled bad exception warnings for Glib.GError's
- 24a13ca0 - pylint: cleaned up some whitespace warnings and disabled cyclic-import
- 583c7499 - cleaned up commit messages
- 4c69d948 - Finalised the linting of the code base
Toggle commit listadded 1 commit
- ec1f9c03 - whitespace adjustments and disabling of some pep8 import warnings
added 1 commit
- 68a7ce43 - whitespace adjustments and disabling of some pep8 import warnings
- Resolved by Jürg Billeter
- Resolved by Jürg Billeter
- Resolved by Jürg Billeter
It's bad form to do more than one change per commit. "pylint: cleaned up some whitespace warnings and disabled cyclic-import" should at minimum split the whitespace changes from the cyclic-import.
Since a lot of the changes to whitespace made were things introduced earlier in the series, the whitespace changes should be split up then squashed into those commits.
- Resolved by Jürg Billeter