jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1058183?usp=email )
Change subject: code formatting
......................................................................
code formatting
patch detached from Ibef01b1c705ec560cafa7bc71feca7f5a0824037
Change-Id: I5ffef06e14ca11e77667d51a8ff1327fda76ca1b
---
M CODE_OF_CONDUCT.rst
M docs/api_ref/family.rst
M docs/api_ref/i18n_plural.rst
M docs/scripts/archive.rst
M docs/scripts/categories.rst
M docs/scripts/outdated.rst
M pywikibot/CONTENT.rst
M pywikibot/proofreadpage.py
M setup.py
M tests/i18n/test/en.json
M tests/i18n/test/fr.json
M tests/i18n/test/fy.json
M tests/i18n/test/ja.json
M tests/i18n/test/nl.json
14 files changed, 12 insertions(+), 18 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst
index 71156e2..370b7a0 100644
--- a/CODE_OF_CONDUCT.rst
+++ b/CODE_OF_CONDUCT.rst
@@ -3,4 +3,3 @@
The development of this software is covered by a
`Code of Conduct <https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct>`_.
-
diff --git a/docs/api_ref/family.rst b/docs/api_ref/family.rst
index 9ba9afd..9717a19 100644
--- a/docs/api_ref/family.rst
+++ b/docs/api_ref/family.rst
@@ -37,4 +37,3 @@
cls.code_aliases = aliases
.. versionadded:: 8.3
-
diff --git a/docs/api_ref/i18n_plural.rst b/docs/api_ref/i18n_plural.rst
index 61d7844..89f4bcb 100644
--- a/docs/api_ref/i18n_plural.rst
+++ b/docs/api_ref/i18n_plural.rst
@@ -3,4 +3,4 @@
***********************************
.. automodule:: plural
- :synopsis: Module containing plural rules of various languages
\ No newline at end of file
+ :synopsis: Module containing plural rules of various languages
diff --git a/docs/scripts/archive.rst b/docs/scripts/archive.rst
index dc11cc8..d745d97 100644
--- a/docs/scripts/archive.rst
+++ b/docs/scripts/archive.rst
@@ -274,4 +274,3 @@
OCR tool will be used to get text.
In this case, also already existing pages with quality value 'Not Proofread'
can be treated. '-force' will override existing page in this case.
-
diff --git a/docs/scripts/categories.rst b/docs/scripts/categories.rst
index 2c78359..fca2dc0 100644
--- a/docs/scripts/categories.rst
+++ b/docs/scripts/categories.rst
@@ -22,4 +22,3 @@
.. automodule:: scripts.commonscat
:no-members:
:noindex:
-
diff --git a/docs/scripts/outdated.rst b/docs/scripts/outdated.rst
index 53f6e2f..5e907af 100644
--- a/docs/scripts/outdated.rst
+++ b/docs/scripts/outdated.rst
@@ -177,4 +177,3 @@
A robot to implement backlinks from an interwiki.log file without checking
them against the live wikipedia.
-
diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst
index 17b5a60..c1a131e 100644
--- a/pywikibot/CONTENT.rst
+++ b/pywikibot/CONTENT.rst
@@ -270,4 +270,3 @@
+----------------------------+------------------------------------------------------+
| README.rst | Package description file |
+----------------------------+------------------------------------------------------+
-
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index 61dfd45..727527d 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -319,7 +319,7 @@
return f"{self.__class__.__name__}('{self}')"
-def decompose(fn: Callable) -> Callable: # type: ignore
+def decompose(fn: Callable) -> Callable:
"""Decorator for ProofreadPage.
Decompose text if needed and recompose text.
@@ -335,7 +335,7 @@
return wrapper
-def check_if_cached(fn: Callable) -> Callable: # type: ignore
+def check_if_cached(fn: Callable) -> Callable:
"""Decorator for IndexPage to ensure data is cached."""
def wrapper(self: IndexPage, *args: Any, **kwargs: Any) -> Any:
@@ -818,7 +818,7 @@
pywikibot.error(f'Error fetching HTML for {self}.')
raise
- soup = _bs4_soup(response.text) # type: ignore
+ soup = _bs4_soup(response.text)
try:
url_image = soup.find(class_='prp-page-image')
@@ -1149,7 +1149,7 @@
self._pages_from_label: dict[str, set[pywikibot.Page]] = {}
self._labels_from_page_number: dict[int, str] = {}
self._labels_from_page: dict[pywikibot.page.Page, str] = {}
- self._soup = _bs4_soup(self.get_parsed_page(True)) # type: ignore
+ self._soup = _bs4_soup(self.get_parsed_page(True))
# Do not search for "new" here, to avoid to skip purging if links
# to non-existing pages are present.
attrs = {'class': re.compile('prp-pagequality-[0-4]')}
@@ -1175,7 +1175,7 @@
}
if not found:
self.purge()
- self._soup = _bs4_soup(self.get_parsed_page(True)) # type: ignore
+ self._soup = _bs4_soup(self.get_parsed_page(True))
if not self._soup.find_all('a', attrs=attrs):
raise ValueError(
'Missing class="qualityN prp-pagequality-N" or '
diff --git a/setup.py b/setup.py
index 20d762f..358aea4 100755
--- a/setup.py
+++ b/setup.py
@@ -102,7 +102,7 @@
# Add all dependencies as test dependencies,
# so all scripts can be compiled for script_tests, etc.
if 'PYSETUP_TEST_EXTRAS' in os.environ: # pragma: no cover
- test_deps += [i for k, v in extra_deps.items() if k != 'flake8' for i in v]
+ test_deps += [i for v in extra_deps.values() for i in v]
# These extra dependencies are needed other unittest fails to load tests.
test_deps += extra_deps['eventstreams']
diff --git a/tests/i18n/test/en.json b/tests/i18n/test/en.json
index 1d53316..f666f31 100644
--- a/tests/i18n/test/en.json
+++ b/tests/i18n/test/en.json
@@ -3,4 +3,4 @@
"test-non-localized": "test-non-localized EN",
"test-plural": "Bot: Changing %(num)s {{PLURAL:%(num)d|page|pages}}.",
"test-semi-localized": "test-semi-localized EN"
-}
\ No newline at end of file
+}
diff --git a/tests/i18n/test/fr.json b/tests/i18n/test/fr.json
index 4066396..369aba5 100644
--- a/tests/i18n/test/fr.json
+++ b/tests/i18n/test/fr.json
@@ -1,3 +1,3 @@
{
"test-plural": "Robot: Changer %(descr)s {{PLURAL:num|une page|quelques pages}}."
-}
\ No newline at end of file
+}
diff --git a/tests/i18n/test/fy.json b/tests/i18n/test/fy.json
index 5e207fb..cb81bc8 100644
--- a/tests/i18n/test/fy.json
+++ b/tests/i18n/test/fy.json
@@ -1,3 +1,3 @@
{
"test-localized": "test-localized FY"
-}
\ No newline at end of file
+}
diff --git a/tests/i18n/test/ja.json b/tests/i18n/test/ja.json
index d9a9084..740a637 100644
--- a/tests/i18n/test/ja.json
+++ b/tests/i18n/test/ja.json
@@ -1,3 +1,3 @@
{
"test-no-english": "test-no-english JA"
-}
\ No newline at end of file
+}
diff --git a/tests/i18n/test/nl.json b/tests/i18n/test/nl.json
index 7f695c9..05b5af1 100644
--- a/tests/i18n/test/nl.json
+++ b/tests/i18n/test/nl.json
@@ -2,4 +2,4 @@
"test-localized": "test-localized NL",
"test-plural": "Bot: Pas {{PLURAL:num|1 pagina|%(num)d pagina's}} aan.",
"test-semi-localized": "test-semi-localized NL"
-}
\ No newline at end of file
+}
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1058183?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: I5ffef06e14ca11e77667d51a8ff1327fda76ca1b
Gerrit-Change-Number: 1058183
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1057942?usp=email )
Change subject: make scripts with shebangs executable
......................................................................
make scripts with shebangs executable
Change-Id: Ia8e39a6b548b7c068d996b200cbaa82534f514f3
---
M docs/_static/css/pywikibot.css
M docs/api_ref/pywikibot.rst
M scripts/maintenance/addwikis.py
M tests/version_tests.py
4 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/_static/css/pywikibot.css b/docs/_static/css/pywikibot.css
index 0844f03..48def52 100644
--- a/docs/_static/css/pywikibot.css
+++ b/docs/_static/css/pywikibot.css
@@ -125,4 +125,4 @@
div.deprecated .versionmodified,
div.versionremoved .versionmodified {
color: var(--deprecated);
-}
\ No newline at end of file
+}
diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst
index 5da2cdc..5def779 100644
--- a/docs/api_ref/pywikibot.rst
+++ b/docs/api_ref/pywikibot.rst
@@ -47,7 +47,7 @@
.. admonition:: Imports from :mod:`page` module
:class: tip
- The following classes and function are inported from :mod:`page` module
+ The following classes and function are inported from :mod:`page` module
but can also be used as :mod:`pywikibot` members:
- :class:`pywikibot.Category<page.Category>`
diff --git a/scripts/maintenance/addwikis.py b/scripts/maintenance/addwikis.py
old mode 100644
new mode 100755
diff --git a/tests/version_tests.py b/tests/version_tests.py
old mode 100644
new mode 100755
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1057942?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: Ia8e39a6b548b7c068d996b200cbaa82534f514f3
Gerrit-Change-Number: 1057942
Gerrit-PatchSet: 1
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: jenkins-bot