Skip to content

Commit

Permalink
[tests] flake8-print namespace was changed from T0 to T2
Browse files Browse the repository at this point in the history
change issue exceptions accordingly

Change-Id: I54ddfc80900752d13e930fbecd622cf3be889751
  • Loading branch information
xqt committed Feb 6, 2024
1 parent 9e4eff4 commit 5913648
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pywikibot/scripts/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main(*args: str) -> None:
warn_type = 'Unknown'

if args:
print('{} arguments: {}\n' # noqa: T001, T201
print('{} arguments: {}\n' # noqa: T201
.format(warn_type, ', '.join(args)))

# Various stuffs in Python 3.4+, such as history file.
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/userinterfaces/_interface_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def input_list_choice(self, *args, **kwargs) -> Any:
@abstractmethod
def output(self, *args, **kwargs) -> None:
"""Output text to a stream."""
print(*args, **kwargs) # noqa: T001, T201
print(*args, **kwargs) # noqa: T201
4 changes: 2 additions & 2 deletions scripts/maintenance/unidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def load_json(path):
with open(path, encoding='utf8') as f:
return load(f)
except OSError:
print('File not found:', path) # noqa: T001, T201
print('File not found:', path) # noqa: T201
return {}


Expand All @@ -151,4 +151,4 @@ def load_json(path):
# families_excepts = load_json(FILEPATH)
# main()
# save_json(families_excepts, FILEPATH)
print(process_site('wiktionary', 'fr')) # noqa: T001, T201
print(process_site('wiktionary', 'fr')) # noqa: T201
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _unknown_test_modules():

def unittest_print(*args, **kwargs):
"""Print information in test log."""
print(*args, **kwargs) # noqa: T001, T201
print(*args, **kwargs) # noqa: T201


def collector(loader=unittest.loader.defaultTestLoader):
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ per-file-ignores =
pywikibot/pagegenerators/__init__.py: N802
pywikibot/pagegenerators/_filters.py: N802
pywikibot/pagegenerators/_generators.py: N802
pywikibot/scripts/generate_family_file.py: T001, T201
pywikibot/scripts/wrapper.py: FI53, T001, T201
pywikibot/scripts/generate_family_file.py: T201
pywikibot/scripts/wrapper.py: FI53, T201
pywikibot/site/_datasite.py: N802
pywikibot/textlib.py: N801, N802, N803, N806
pywikibot/throttle.py: N802
Expand All @@ -191,14 +191,14 @@ per-file-ignores =
scripts/harvest_template.py: N802, N816
scripts/interwiki.py: N802, N803, N806, N816
scripts/imagetransfer.py: N803, N806, N816
scripts/maintenance/make_i18n_dict.py: T001, T201
scripts/maintenance/make_i18n_dict.py: T201
scripts/misspelling.py: N802
scripts/noreferences.py: N802, N803, N806, N816
scripts/redirect.py: N803, N806
scripts/reflinks.py: N802, N816
scripts/replace.py: N802, N803, N806, N816
scripts/solve_disambiguation.py: N802, N806
setup.py: T001, T201
setup.py: T201
tests/api_tests.py: N802
tests/archivebot_tests.py: N802
tests/aspects.py: N802
Expand All @@ -215,7 +215,7 @@ per-file-ignores =
tests/namespace_tests.py: N802
tests/page_tests.py: E241, N802
tests/pagegenerators_tests.py: N802
tests/pwb/*: T001, T201
tests/pwb/*: T201
tests/site_detect_tests.py: N802
tests/sparql_tests.py: N802
tests/textlib_tests.py: N802
Expand Down

0 comments on commit 5913648

Please sign in to comment.