[anaconda:master 0/3] Using a pointless overrides checker
amulhern at redhat.com
Tue Dec 2 18:24:18 UTC 2014
The first patch is motivated by the results of the pointless overrides checker.
The checker identifies somethings as pointless overrides which aren't really
meant to be class attributes at all. It seemed sensible to just refactor all
that path calculation into a staticmethod.
The other two patches just add the pylint checker and then remove pointless
overrides identified. The checker has to be used with some judgement in
when there is multiple inheritance, which occurs with TUIObject, so I did
have to check a few by hand. The restrictions of the checker are all
documented in the comments.
Factor computation of paths attribute into UserInterface class.
Add a simple pointless-override checker to pylint checkers.
Remove pointless overrides identified by the pointless override
pyanaconda/bootloader.py | 3 -
pyanaconda/installclasses/fedora.py | 2 -
pyanaconda/installclasses/rhel.py | 1 -
pyanaconda/packaging/dnfpayload.py | 3 -
pyanaconda/ui/__init__.py | 32 ++++-
pyanaconda/ui/gui/__init__.py | 21 +--
pyanaconda/ui/tui/__init__.py | 20 +--
pyanaconda/ui/tui/tuiobject.py | 9 --
tests/pylint/intl.py | 2 -
tests/pylint/pointless-override.py | 252 ++++++++++++++++++++++++++++++++++++
tests/pylint/pylint-one.sh | 2 +-
11 files changed, 285 insertions(+), 62 deletions(-)
create mode 100644 tests/pylint/pointless-override.py
More information about the anaconda-patches