Skip to content

Commit

Permalink
chore: update pre-commit (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 12, 2024
1 parent bb88079 commit 08dfc05
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-python-slugify==6.1.0]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 7.1.1
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions local-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mypy==0.961
build==1.2.2.post1
twine==4.0.1
wheel==0.38.1
flake8==4.0.1
pre-commit==2.19.0
flake8==7.1.1
pre-commit==4.0.1
Django==4.2.16
pytest-xdist==2.5.0
9 changes: 4 additions & 5 deletions pytest_playwright/pytest_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ def __call__(
record_har_url_filter: Optional[Union[str, Pattern[str]]] = None,
record_har_mode: Optional[Literal["full", "minimal"]] = None,
record_har_content: Optional[Literal["attach", "embed", "omit"]] = None,
) -> BrowserContext:
...
) -> BrowserContext: ...


@pytest.fixture
Expand Down Expand Up @@ -489,7 +488,7 @@ def did_finish_test(self, failed: bool) -> None:
for index, screenshot in enumerate(self._screenshots):
human_readable_status = "failed" if failed else "finished"
screenshot_path = self._build_artifact_test_folder(
f"test-{human_readable_status}-{index+1}.png",
f"test-{human_readable_status}-{index + 1}.png",
)
os.makedirs(os.path.dirname(screenshot_path), exist_ok=True)
shutil.move(screenshot, screenshot_path)
Expand All @@ -502,7 +501,7 @@ def did_finish_test(self, failed: bool) -> None:
):
for index, trace in enumerate(self._traces):
trace_file_name = (
"trace.zip" if len(self._traces) == 1 else f"trace-{index+1}.zip"
"trace.zip" if len(self._traces) == 1 else f"trace-{index + 1}.zip"
)
trace_path = self._build_artifact_test_folder(trace_file_name)
os.makedirs(os.path.dirname(trace_path), exist_ok=True)
Expand All @@ -524,7 +523,7 @@ def did_finish_test(self, failed: bool) -> None:
video_file_name = (
"video.webm"
if len(self._all_pages) == 1
else f"video-{index+1}.webm"
else f"video-{index + 1}.webm"
)
video.save_as(
path=self._build_artifact_test_folder(video_file_name)
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ignore =
E501
W503
E302
# Conflicts with black https://github.com/PyCQA/flake8/issues/1921
E704
[mypy]
ignore_missing_imports = True
python_version = 3.9
Expand Down

0 comments on commit 08dfc05

Please sign in to comment.