Wikimedia
Pywikibot: (Re)move unused code reported by Vulture (VI)
Pywikibot is a Python-based framework to write bots for MediaWiki (more information).
There are some code pieces that are not used by Pywikibot and a quick scan with vulture creates the output below;
$ python -m vulture ./ --min-confidence 61
scripts/script_wui.py:310: unsatisfiable 'if' condition (100% confidence)
tests/deprecation_tests.py:23: unreachable code after 'raise' (100% confidence)
tests/deprecation_tests.py:34: unreachable code after 'raise' (100% confidence)
tests/deprecation_tests.py:209: unused variable 'foo3' (100% confidence)
tests/deprecation_tests.py:209: unused variable 'foo4' (100% confidence)
Setup Pywikibot locally and remove these unused codes. It will be also useful to recheck this report with vulture and also before making a patch, run unit tests to make sure no regressions have been introduced.
Acceptance Criteria
- Submit a patch fixing 5 cases of unused code related to this task! You are expected to provide a patch in Wikimedia Gerrit. See https://www.mediawiki.org/wiki/Gerrit/Tutorial for how to set up Git and Gerrit.
Task tags
Students who completed this task
YVB