jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/736204 )
Change subject: [IMPR] Use string format style with exception message ......................................................................
[IMPR] Use string format style with exception message
Use string format style with AbuseFilterDisallowedError and InvalidPageError message
Change-Id: I77e6081e3a2716abf55f7a5c5d9537f15355366b --- M pywikibot/exceptions.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index ef76f0f..b7ceeda 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -473,7 +473,7 @@ .. versionadded:: 6.2 """
- message = 'Page %s is invalid.' + message = 'Page {} is invalid.'
class InvalidTitleError(Error): @@ -549,8 +549,8 @@
"""Page save failed because the AbuseFilter disallowed it."""
- message = ('Edit to page %(title)s disallowed by the AbuseFilter.\n' - '%(info)s') + message = ('Edit to page {title} disallowed by the AbuseFilter.\n' + '{info}')
def __init__(self, page: 'pywikibot.page.Page', info: str, other: str) -> None:
pywikibot-commits@lists.wikimedia.org