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 +}
pywikibot-commits@lists.wikimedia.org