Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/816297 )
Change subject: [CI] ignore some code from coverage ......................................................................
[CI] ignore some code from coverage
Change-Id: Ic485c6677bdb27903b280a68160ff4386a284186 --- M pywikibot/bot.py M pywikibot/bot_choice.py M pywikibot/page/_pages.py 3 files changed, 6 insertions(+), 6 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 19a3f24..97948ea 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -415,7 +415,7 @@ # give up infinite rotating file handler with logfilecount of -1; # set it to 999 and use the standard implementation max_count = config.logfilecount - if max_count == -1: + if max_count == -1: # pragma: no cover max_count = 999 issue_deprecation_warning('config.logfilecount with value -1', 'any positive number', @@ -2036,7 +2036,7 @@ return super().skip_page(page)
-class RedirectPageBot(CurrentPageBot): +class RedirectPageBot(CurrentPageBot): # pragma: no cover
"""A RedirectPageBot class which only treats redirects.
@@ -2062,7 +2062,7 @@ return super().skip_page(page)
-class NoRedirectPageBot(CurrentPageBot): +class NoRedirectPageBot(CurrentPageBot): # pragma: no cover
"""A NoRedirectPageBot class which only treats non-redirects.
diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py index 040f06f..6e13acf 100644 --- a/pywikibot/bot_choice.py +++ b/pywikibot/bot_choice.py @@ -195,7 +195,7 @@ @property def out(self) -> str: """Return the contents.""" - if not hasattr(self._outputter, 'out'): + if not hasattr(self._outputter, 'out'): # pragma: no cover issue_deprecation_warning('{} without "out" property' .format(self.__class__.__name__), since='6.2.0') diff --git a/pywikibot/page/_pages.py b/pywikibot/page/_pages.py index a6f4ea3..0d4f2be 100644 --- a/pywikibot/page/_pages.py +++ b/pywikibot/page/_pages.py @@ -1223,7 +1223,7 @@ if not summary: summary = config.default_edit_summary
- if isinstance(watch, bool): + if isinstance(watch, bool): # pragma: no cover issue_deprecation_warning( 'boolean watch parameter', '"watch", "unwatch", "preferences" or "nochange" value', @@ -1420,7 +1420,7 @@ """ # Deprecate positional arguments and synchronize with Site.pagelinks keys = ('namespaces', 'total', 'content') - for i, arg in enumerate(args): + for i, arg in enumerate(args): # pragma: no cover key = keys[i] issue_deprecation_warning( 'Positional argument {} ({})'.format(i + 1, arg),
pywikibot-commits@lists.wikimedia.org