Skip to content

Commit

Permalink
Bump Ruff and use formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 17, 2025
1 parent ba478fc commit c8a3d80
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.0"
rev: "v0.9.2"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
4 changes: 3 additions & 1 deletion plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def test_error():
result = testdir.runpytest_subprocess()

result.stderr.re_match_lines(
[r"::error file=test_annotation_pytest_error\.py,line=8::test_error.*",]
[
r"::error file=test_annotation_pytest_error\.py,line=8::test_error.*",
]
)


Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ extend-select = [
]
ignore = [
"PLR", # Design related pylint codes
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
]
isort.required-imports = ["from __future__ import annotations"]

Expand Down
6 changes: 2 additions & 4 deletions pytest_github_actions_annotate_failures/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from __future__ import annotations

import contextlib
Expand Down Expand Up @@ -133,6 +132,7 @@ def pytest_addoption(parser):
help="Annotate failures in GitHub Actions.",
)


def pytest_configure(config):
if not config.option.exclude_warning_annotations:
config.pluginmanager.register(_AnnotateWarnings(), "annotate_warnings")
Expand Down Expand Up @@ -160,9 +160,7 @@ def _build_workflow_command(
("title", title),
]

result = result + ",".join(
f"{k}={v}" for k, v in entries if v is not None
)
result = result + ",".join(f"{k}={v}" for k, v in entries if v is not None)

if message is not None:
result = result + "::" + _escape(message)
Expand Down

0 comments on commit c8a3d80

Please sign in to comment.