Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Ruff and use formatter #96

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading