John Vandenberg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/303371
Change subject: Fix docstring capitalization in return types and behavior
......................................................................
Fix docstring capitalization in return types and behavior
Bug: T121365
Change-Id: I08aea29e0db61ab930fb2fefd8f5d025f7d36f55
(manually cherry-picked from c150a28)
---
M pywikibot/comms/rcstream.py
M scripts/data_ingestion.py
M scripts/featured.py
M scripts/replicate_wiki.py
M tests/ui_tests.py
5 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/71/303371/1
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py
index d024bc8..544e911 100644
--- a/pywikibot/comms/rcstream.py
+++ b/pywikibot/comms/rcstream.py
@@ -141,7 +141,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 c30669e..eac28be 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -141,7 +141,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 9e534b7..cef48d7 100755
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -541,7 +541,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 788f993..9cbed4f 100755
--- a/scripts/replicate_wiki.py
+++ b/scripts/replicate_wiki.py
@@ -56,7 +56,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/ui_tests.py b/tests/ui_tests.py
index 811dfe2..a5779e8 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -194,7 +194,7 @@
def unpatch():
- """un-patch standard terminal files."""
+ """Un-patch standard terminal files."""
ui._print = org_print
ui._raw_input = org_input
--
To view, visit https://gerrit.wikimedia.org/r/303371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08aea29e0db61ab930fb2fefd8f5d025f7d36f55
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Negative24 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits