jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/513584 )
Change subject: [IMPR] sort textlib_methods and __all__ entries ......................................................................
[IMPR] sort textlib_methods and __all__ entries
- sort textlib_methods and __all__ entries to avoid duplicates - adjust FutureWarning line for ignoring
Change-Id: Ibcb72755462a5f9bba08af08e9464585ce7572f0 --- M pywikibot/__init__.py M tests/utils.py 2 files changed, 25 insertions(+), 33 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index cc76052..434a079 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -80,41 +80,33 @@
textlib_methods = ( - 'unescape', 'replaceExcept', 'removeDisabledParts', 'removeHTMLParts', - 'isDisabled', 'interwikiFormat', 'interwikiSort', - 'getLanguageLinks', 'replaceLanguageLinks', - 'removeLanguageLinks', 'removeLanguageLinksAndSeparator', - 'getCategoryLinks', 'categoryFormat', 'replaceCategoryLinks', - 'removeCategoryLinks', 'removeCategoryLinksAndSeparator', - 'replaceCategoryInPlace', 'compileLinkR', 'extract_templates_and_params', - 'TimeStripper', + 'categoryFormat', 'compileLinkR', 'extract_templates_and_params', + 'getCategoryLinks', 'getLanguageLinks', 'interwikiFormat', 'interwikiSort', + 'isDisabled', 'removeCategoryLinks', 'removeCategoryLinksAndSeparator', + 'removeDisabledParts', 'removeHTMLParts', 'removeLanguageLinks', + 'removeLanguageLinksAndSeparator', 'replaceCategoryInPlace', + 'replaceCategoryLinks', 'replaceExcept', 'replaceLanguageLinks', + 'TimeStripper', 'unescape', )
__all__ = ( - 'config', 'ui', 'Site', 'UnicodeMixin', 'translate', - 'Page', 'FilePage', 'Category', 'Link', 'User', - 'ItemPage', 'PropertyPage', 'Claim', - 'html2unicode', 'url2unicode', 'unicode2html', - 'stdout', 'output', 'warning', 'error', 'critical', 'debug', - 'exception', 'input_choice', 'input', 'input_yn', 'inputChoice', - 'handle_args', 'handleArgs', 'showHelp', 'log', - 'calledModuleName', 'Bot', 'CurrentPageBot', 'WikidataBot', - 'Error', 'InvalidTitle', 'BadTitle', 'NoPage', 'NoMoveTarget', - 'SectionError', - 'SiteDefinitionError', 'NoSuchSite', 'UnknownSite', 'UnknownFamily', - 'UnknownExtension', - 'NoUsername', 'UserBlocked', 'UserActionRefuse', - 'PageRelatedError', 'UnsupportedPage', 'IsRedirectPage', - 'IsNotRedirectPage', - 'PageSaveRelatedError', 'PageNotSaved', 'OtherPageSaveError', - 'LockedPage', 'CascadeLockedPage', 'LockedNoPage', 'NoCreateError', - 'EditConflict', 'PageDeletedConflict', 'PageCreatedConflict', - 'UploadWarning', - 'ServerError', 'FatalServerError', 'Server504Error', - 'CaptchaError', 'SpamfilterError', 'TitleblacklistError', - 'CircularRedirect', 'InterwikiRedirectPage', - 'WikiBaseError', 'CoordinateGlobeUnknownException', - 'QuitKeyboardInterrupt', + 'BadTitle', 'Bot', 'calledModuleName', 'CaptchaError', 'CascadeLockedPage', + 'Category', 'CircularRedirect', 'Claim', 'config', + 'CoordinateGlobeUnknownException', 'critical', 'CurrentPageBot', 'debug', + 'EditConflict', 'error', 'Error', 'exception', 'FatalServerError', + 'FilePage', 'handle_args', 'handleArgs', 'html2unicode', 'input', + 'input_choice', 'input_yn', 'inputChoice', 'InterwikiRedirectPage', + 'InvalidTitle', 'IsNotRedirectPage', 'IsRedirectPage', 'ItemPage', 'Link', + 'LockedNoPage', 'LockedPage', 'log', 'NoCreateError', 'NoMoveTarget', + 'NoPage', 'NoSuchSite', 'NoUsername', 'OtherPageSaveError', 'output', + 'Page', 'PageCreatedConflict', 'PageDeletedConflict', 'PageNotSaved', + 'PageRelatedError', 'PageSaveRelatedError', 'PropertyPage', + 'QuitKeyboardInterrupt', 'SectionError', 'Server504Error', 'ServerError', + 'showHelp', 'Site', 'SiteDefinitionError', 'SpamfilterError', 'stdout', + 'TitleblacklistError', 'translate', 'ui', 'unicode2html', 'UnicodeMixin', + 'UnknownExtension', 'UnknownFamily', 'UnknownSite', 'UnsupportedPage', + 'UploadWarning', 'url2unicode', 'User', 'UserActionRefuse', 'UserBlocked', + 'warning', 'WikiBaseError', 'WikidataBot', ) __all__ += textlib_methods
diff --git a/tests/utils.py b/tests/utils.py index 101b63b..70afa24 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -644,7 +644,7 @@ @type command: list of unicode """ if PY2: - command.insert(1, '-W ignore::FutureWarning:pywikibot:132') + command.insert(1, '-W ignore::FutureWarning:pywikibot:124') if cryptography_version and cryptography_version < [1, 3, 4]: command.insert(1, '-W ignore:Old version of cryptography:Warning') # Any environment variables added on Windows must be of type