jenkins-bot has submitted this change and it was merged.
Change subject: Fix docstring capitalization in return types and behavior ......................................................................
Fix docstring capitalization in return types and behavior
Bug: T121365 Change-Id: I08aea29e0db61ab930fb2fefd8f5d025f7d36f55 --- M pywikibot/comms/rcstream.py M scripts/data_ingestion.py M scripts/featured.py M scripts/replicate_wiki.py M tests/djvu_tests.py M tests/textlib_tests.py M tests/ui_tests.py M tests/utils.py 8 files changed, 9 insertions(+), 9 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py index 4a04189..95056fd 100644 --- a/pywikibot/comms/rcstream.py +++ b/pywikibot/comms/rcstream.py @@ -147,7 +147,7 @@
def rc_listener(wikihost, rchost, rcport=80, rcpath='/rc', total=None): - """RC Changes Generator. Yields changes received from RCstream. + """Yield changes received from RCstream.
@param wikihost: the hostname of the wiki we want to get changes for. This is passed to rcstream using a 'subscribe' command. Pass @@ -195,7 +195,7 @@
def site_rc_listener(site, total=None): - """RC Changes Generator. Yields changes received from RCstream. + """Yield changes received from RCstream.
@param site: the Pywikibot.Site object to yield live recent changes for @type site: Pywikibot.BaseSite diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py index 68f6880..40516cf 100755 --- a/scripts/data_ingestion.py +++ b/scripts/data_ingestion.py @@ -145,7 +145,7 @@
def CSVReader(fileobj, urlcolumn, site=None, *args, **kwargs): - """CSV reader.""" + """Yield Photo objects for each row of a CSV file.""" reader = csv.DictReader(fileobj, *args, **kwargs) for line in reader: yield Photo(line[urlcolumn], line, site=site) diff --git a/scripts/featured.py b/scripts/featured.py index 672e545..a29b05f 100755 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -544,7 +544,7 @@ def add_template(self, source, dest, task, fromsite): """Place or remove the Link_GA/FA template on/from a page.""" def compile_link(site, templates): - """compile one link template list.""" + """Compile one link template list.""" findtemplate = '(%s)' % '|'.join(templates) return re.compile(r"{{%s|%s}}" % (findtemplate.replace(u' ', u'[ _]'), diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py index 97aa610..784b6d3 100755 --- a/scripts/replicate_wiki.py +++ b/scripts/replicate_wiki.py @@ -59,7 +59,7 @@
@deprecated('BaseSite.namespaces') def namespaces(site): - """dict from namespace number to prefix.""" + """Return a dictionary from namespace number to prefix.""" return dict((n.id, n.custom_name) for n in site.namespaces)
diff --git a/tests/djvu_tests.py b/tests/djvu_tests.py index e256fca..65742fe 100644 --- a/tests/djvu_tests.py +++ b/tests/djvu_tests.py @@ -33,7 +33,7 @@
@classmethod def setUpClass(cls): - """SetUp tests.""" + """Setup tests.""" super(TestDjVuFile, cls).setUpClass() try: subprocess.Popen(['djvudump'], diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 6b674a8..00bf1f8 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -525,7 +525,7 @@ [(None, OrderedDict())])
def test_regexes(self): - """_ETP_REGEX, NESTED_TEMPLATE_REGEX and TEMP_REGEX tests.""" + """Test _ETP_REGEX, NESTED_TEMPLATE_REGEX and TEMP_REGEX.""" func = textlib._ETP_REGEX.search
self.assertIsNotNone(func('{{{1}}}')) diff --git a/tests/ui_tests.py b/tests/ui_tests.py index 138afb2..ce21c07 100644 --- a/tests/ui_tests.py +++ b/tests/ui_tests.py @@ -199,7 +199,7 @@
def unpatch(): - """un-patch standard terminal files.""" + """Un-patch standard terminal files.""" ui._print = org_print ui._raw_input = org_input
diff --git a/tests/utils.py b/tests/utils.py index ab1f946..0616002 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -204,7 +204,7 @@ def __enter__(self): """Enter the context manager.""" def detailed_show_warning(*args, **kwargs): - """warnings.showwarning replacement handler.""" + """Replacement handler for warnings.showwarning.""" entry = warnings.WarningMessage(*args, **kwargs)
skip_lines = 0
pywikibot-commits@lists.wikimedia.org