jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[types] Update types for add_text.py

Change-Id: I833d020cc19746e09e37808a5b1831f23e16612e
---
M scripts/add_text.py
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/add_text.py b/scripts/add_text.py
index 6b3b20e..a0a1cf9 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -69,13 +69,14 @@
import pywikibot

from pywikibot import config, pagegenerators, textlib
-from pywikibot.backports import Dict, Tuple
+from pywikibot.backports import Dict, Sequence
from pywikibot.bot import (
AutomaticTWSummaryBot,
ExistingPageBot,
NoRedirectPageBot,
)

+ARGS_TYPE = Dict[str, Union[bool, str]]
DEFAULT_ARGS = {
'text': '',
'textfile': '',
@@ -88,7 +89,7 @@
'talk_page': False,
'reorder': True,
'regex_skip_url': '',
-}
+} # type: ARGS_TYPE

ARG_PROMPT = {
'-text': 'What text do you want to add?',
@@ -198,9 +199,9 @@
bot.run()


-def parse(argv: Tuple[str, ...],
+def parse(argv: Sequence[str],
generator_factory: pagegenerators.GeneratorFactory
- ) -> Dict[str, Union[bool, str]]:
+ ) -> ARGS_TYPE:
"""
Parses our arguments and provide a named tuple with their values.


To view, visit change 722592. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I833d020cc19746e09e37808a5b1831f23e16612e
Gerrit-Change-Number: 722592
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged