Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Oct 30, 2024
1 parent 947da28 commit 30f4c37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.4.3"
rev: "v2.4.3"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.0"
rev: "v0.7.1"
hooks:
- id: ruff-format
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion src/tox_ini_fmt/formatter/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def to_list_of_env_values(pin_toxenvs: list[str], payload: str) -> str:
within_braces = False
envs = [i.strip() for i in brace_str[1:].split(",")]
order_env_list(envs, pin_toxenvs)
cur_str += f'{{{", ".join(envs)}}}'
cur_str += f"{{{', '.join(envs)}}}"
brace_str = ""
continue
elif char in {",", "\n"}:
Expand Down
5 changes: 1 addition & 4 deletions tests/formatter/test_test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ def test_format_test_env_ref( # noqa: PLR0913
post: str,
expected: str,
) -> None:
text = (
f"[testenv]\n{key}={before}\n[testenv:py]"
f"\n{key}=\n {pre}\n {{[testenv:x]X}}\n {{[testenv]{key}}}\n {post}\n"
)
text = f"[testenv]\n{key}={before}\n[testenv:py]\n{key}=\n {pre}\n {{[testenv:x]X}}\n {{[testenv]{key}}}\n {post}\n"
tox_ini.write_text(text)
outcome = format_tox_ini(tox_ini)
expected = f"[tox]\nrequires =\n tox>=4.2\n\n[testenv]\n{key} ={before}\n\n[testenv:py]\n{key} ={expected}\n"
Expand Down

0 comments on commit 30f4c37

Please sign in to comment.