Skip to content

Commit 08dfc05

Browse files
authored
chore: update pre-commit (#256)
1 parent bb88079 commit 08dfc05

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.3.0
5+
rev: v5.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- repo: https://github.com/psf/black
12-
rev: 22.6.0
12+
rev: 24.10.0
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/pre-commit/mirrors-mypy
16-
rev: v0.961
16+
rev: v1.13.0
1717
hooks:
1818
- id: mypy
1919
additional_dependencies: [types-python-slugify==6.1.0]
2020
- repo: https://github.com/pycqa/flake8
21-
rev: 4.0.1
21+
rev: 7.1.1
2222
hooks:
2323
- id: flake8

local-requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mypy==0.961
44
build==1.2.2.post1
55
twine==4.0.1
66
wheel==0.38.1
7-
flake8==4.0.1
8-
pre-commit==2.19.0
7+
flake8==7.1.1
8+
pre-commit==4.0.1
99
Django==4.2.16
1010
pytest-xdist==2.5.0

pytest_playwright/pytest_playwright.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,7 @@ def __call__(
303303
record_har_url_filter: Optional[Union[str, Pattern[str]]] = None,
304304
record_har_mode: Optional[Literal["full", "minimal"]] = None,
305305
record_har_content: Optional[Literal["attach", "embed", "omit"]] = None,
306-
) -> BrowserContext:
307-
...
306+
) -> BrowserContext: ...
308307

309308

310309
@pytest.fixture
@@ -489,7 +488,7 @@ def did_finish_test(self, failed: bool) -> None:
489488
for index, screenshot in enumerate(self._screenshots):
490489
human_readable_status = "failed" if failed else "finished"
491490
screenshot_path = self._build_artifact_test_folder(
492-
f"test-{human_readable_status}-{index+1}.png",
491+
f"test-{human_readable_status}-{index + 1}.png",
493492
)
494493
os.makedirs(os.path.dirname(screenshot_path), exist_ok=True)
495494
shutil.move(screenshot, screenshot_path)
@@ -502,7 +501,7 @@ def did_finish_test(self, failed: bool) -> None:
502501
):
503502
for index, trace in enumerate(self._traces):
504503
trace_file_name = (
505-
"trace.zip" if len(self._traces) == 1 else f"trace-{index+1}.zip"
504+
"trace.zip" if len(self._traces) == 1 else f"trace-{index + 1}.zip"
506505
)
507506
trace_path = self._build_artifact_test_folder(trace_file_name)
508507
os.makedirs(os.path.dirname(trace_path), exist_ok=True)
@@ -524,7 +523,7 @@ def did_finish_test(self, failed: bool) -> None:
524523
video_file_name = (
525524
"video.webm"
526525
if len(self._all_pages) == 1
527-
else f"video-{index+1}.webm"
526+
else f"video-{index + 1}.webm"
528527
)
529528
video.save_as(
530529
path=self._build_artifact_test_folder(video_file_name)

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ignore =
33
E501
44
W503
55
E302
6+
# Conflicts with black https://github.com/PyCQA/flake8/issues/1921
7+
E704
68
[mypy]
79
ignore_missing_imports = True
810
python_version = 3.9

0 commit comments

Comments
 (0)