Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#3102)
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] committed Aug 22, 2023
1 parent 9ceec6e commit cd7616f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ repos:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.8"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.1"
rev: "v3.0.2"
hooks:
- id: prettier
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.284"
rev: "v0.0.285"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion src/tox/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _setup_files(dest: Path, base: Path | None, content: dict[str, Any]) -> None
value = f"from __future__ import annotations\n{value}" # noqa: PLW2901
if isinstance(value, dict):
at_path.mkdir(exist_ok=True)
ToxProject._setup_files(at_path, None, value) # noqa: SLF001
ToxProject._setup_files(at_path, None, value)
elif isinstance(value, str):
at_path.write_text(textwrap.dedent(value), encoding="utf-8")
elif value is None:
Expand Down
10 changes: 9 additions & 1 deletion tests/session/test_env_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,15 @@ def test_matches_hyphenated_env(env_name: str, tox_project: ToxProjectCreator) -

@pytest.mark.parametrize(
"env_name",
[f"3.{_MINOR}", f"3.{_MINOR}-cov", "3-cov", "3", f"3.{_MINOR}", f"py3{_MINOR}-cov", f"py3.{_MINOR}-cov"],
[
f"3.{_MINOR}",
f"3.{_MINOR}-cov",
"3-cov",
"3",
f"py3.{_MINOR}",
f"py3{_MINOR}-cov",
f"py3.{_MINOR}-cov",
],
)
def test_matches_combined_env(env_name: str, tox_project: ToxProjectCreator) -> None:
tox_ini = """
Expand Down

0 comments on commit cd7616f

Please sign in to comment.