jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/430895 )
Change subject: [IMPR] Remove unused private variables ......................................................................
[IMPR] Remove unused private variables
- _get_base_dir was held for backward compatibility but it is private and can be removed - _base_dir is also private and only used inside config2.py; it can be replaced by the correspninding public base_dir
Change-Id: I99ebce0ac2edfbb43245001a4eba579fd1800b8d --- M pywikibot/config2.py 1 file changed, 2 insertions(+), 4 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py index f621da6..fb85461 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -376,10 +376,8 @@ return base_dir
-_get_base_dir = get_base_dir # for backward compatibility -_base_dir = get_base_dir() # Save base_dir for use by other modules -base_dir = _base_dir +base_dir = get_base_dir()
for arg in sys.argv[1:]: if arg.startswith(str('-verbose')) or arg == str('-v'): @@ -1023,7 +1021,7 @@ warning('Skipping loading of user-config.py.') _fns = [] else: - _fns = [os.path.join(_base_dir, "user-config.py")] + _fns = [os.path.join(base_dir, 'user-config.py')] for _filename in _fns: _thislevel += 1 if os.path.exists(_filename):
pywikibot-commits@lists.wikimedia.org