jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/770142 )
Change subject: exceptions-typing: pages can be a BasePage ......................................................................
exceptions-typing: pages can be a BasePage
Change-Id: I02d5ddb7b674308f5b1aa626c33dfb17c5bd8c83 --- M pywikibot/exceptions.py 1 file changed, 6 insertions(+), 6 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index de97765..8fd93ab 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -326,7 +326,7 @@
message = 'Edit to page {title} failed:\n{reason}'
- def __init__(self, page: 'pywikibot.page.Page', + def __init__(self, page: 'pywikibot.page.BasePage', reason: Union[str, Exception]) -> None: """Initializer.
@@ -379,7 +379,7 @@
"""Page receives a title inconsistent with query."""
- def __init__(self, page: 'pywikibot.page.Page', actual: str) -> None: + def __init__(self, page: 'pywikibot.page.BasePage', actual: str) -> None: """Initializer.
:param page: Page that caused the exception @@ -455,8 +455,8 @@ 'Page: {page}\n' 'Target page: {target_page} on {target_site}.')
- def __init__(self, page: 'pywikibot.page.Page', - target_page: 'pywikibot.page.Page') -> None: + def __init__(self, page: 'pywikibot.page.BasePage', + target_page: 'pywikibot.page.BasePage') -> None: """Initializer.
:param target_page: Target page of the redirect. @@ -550,7 +550,7 @@ message = ('Edit to page {title} disallowed by the AbuseFilter.\n' '{info}')
- def __init__(self, page: 'pywikibot.page.Page', info: str) -> None: + def __init__(self, page: 'pywikibot.page.BasePage', info: str) -> None: """Initializer.""" self.info = info super().__init__(page) @@ -563,7 +563,7 @@ message = ('Edit to page {title} rejected by spam filter due to ' 'content:\n{url}')
- def __init__(self, page: 'pywikibot.page.Page', url: str) -> None: + def __init__(self, page: 'pywikibot.page.BasePage', url: str) -> None: """Initializer.""" self.url = url super().__init__(page)
pywikibot-commits@lists.wikimedia.org