Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2024
1 parent 78828f8 commit 2e81916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
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 2e81916

Please sign in to comment.