Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1307631?usp=email )
Change subject: Fix spelling mistakes and missing format prefix
......................................................................
Fix spelling mistakes and missing format prefix
Change-Id: I1cbda59bd49fc60df41875767e66188938a07fd0
---
M pywikibot/page/_toolforge.py
M tests/site_generators_tests.py
M tests/sparql_tests.py
3 files changed, 8 insertions(+), 8 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py
index 1e2426e..24c2a96 100644
--- a/pywikibot/page/_toolforge.py
+++ b/pywikibot/page/_toolforge.py
@@ -49,7 +49,7 @@
if not self.exists():
raise pywikibot.exceptions.NoPageError(self)
- @deprecated('authorsship', since='9.3.0')
+ @deprecated('authorship', since='9.3.0')
@deprecated_args(onlynew=None) # since 9.2.0
def main_authors(self) -> collections.Counter[str, int]:
"""Retrieve the 5 topmost main authors of an article.
@@ -158,7 +158,7 @@
chars changes.
:param min_pct: Only return authors with more than *min_pct*
percentage edits.
- :param max_pct_sum: Only return authors until the prcentage sum
+ :param max_pct_sum: Only return authors until the percentage sum
reached *max_pct_sum*.
:return: Character count and percentage of edits for each
username.
diff --git a/tests/site_generators_tests.py b/tests/site_generators_tests.py
index 4f4feb3..d01d0fa 100755
--- a/tests/site_generators_tests.py
+++ b/tests/site_generators_tests.py
@@ -1102,7 +1102,7 @@
f'gsrsearch returned timeout on site {mysite}:\n{e!r}')
if e.code == 'gsrsearch-text-disabled':
self.skipTest(
- 'gsrsearch is disabled on site {mysite}:\n{e!r}')
+ f'gsrsearch is disabled on site {mysite}:\n{e!r}')
if (e.code == 'cirrussearch-backend-error'
and mysite.family.name == 'wpbeta'): # T426529
self.skipTest(
diff --git a/tests/sparql_tests.py b/tests/sparql_tests.py
index ffb985f..c084dad 100755
--- a/tests/sparql_tests.py
+++ b/tests/sparql_tests.py
@@ -21,7 +21,7 @@
# See: https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321/
-SQL_RESPONSE_CONTAINER = """
+SPARQL_RESPONSE_CONTAINER = """
{
"head" : {
"vars" : [ "cat", "d", "catLabel" ]
@@ -108,7 +108,7 @@
def testQuerySelect(self, mock_method) -> None:
"""Test SELECT query."""
mock_method.return_value = Container(
- SQL_RESPONSE_CONTAINER % f'{ITEM_Q498787}, {ITEM_Q677525}')
+ SPARQL_RESPONSE_CONTAINER % f'{ITEM_Q498787}, {ITEM_Q677525}')
with skipping(pywikibot.exceptions.ApiTimeoutError):
q = sparql.SparqlQuery()
res = q.select('SELECT * WHERE { ?x ?y ?z }')
@@ -130,7 +130,7 @@
def testQuerySelectFull(self, mock_method) -> None:
"""Test SELECT query with full data."""
mock_method.return_value = Container(
- SQL_RESPONSE_CONTAINER % f'{ITEM_Q498787}, {ITEM_Q677525}')
+ SPARQL_RESPONSE_CONTAINER % f'{ITEM_Q498787}, {ITEM_Q677525}')
with skipping(pywikibot.exceptions.ApiTimeoutError):
q = sparql.SparqlQuery()
res = q.select('SELECT * WHERE { ?x ?y ?z }', full_data=True)
@@ -159,8 +159,8 @@
def testGetItems(self, mock_method) -> None:
"""Test item list retrieval via SPARQL."""
mock_method.return_value = Container(
- SQL_RESPONSE_CONTAINER % (f'{ITEM_Q498787}, {ITEM_Q677525}, '
- f'{ITEM_Q677525}')
+ SPARQL_RESPONSE_CONTAINER % (f'{ITEM_Q498787}, {ITEM_Q677525}, '
+ f'{ITEM_Q677525}')
)
with skipping(pywikibot.exceptions.ApiTimeoutError):
q = sparql.SparqlQuery()
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1307631?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I1cbda59bd49fc60df41875767e66188938a07fd0
Gerrit-Change-Number: 1307631
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]