Skip to content

Commit 374660b

Browse files
[pre-commit.ci] pre-commit autoupdate (#2753)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 61e774f commit 374660b

File tree

16 files changed

+30
-30
lines changed

16 files changed

+30
-30
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/python-jsonschema/check-jsonschema
8-
rev: 0.28.6
8+
rev: 0.29.2
99
hooks:
1010
- id: check-github-workflows
1111
args: [ "--verbose" ]
@@ -20,11 +20,11 @@ repos:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "2.1.4"
23+
rev: "2.2.1"
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: "v0.5.0"
27+
rev: "v0.6.3"
2828
hooks:
2929
- id: ruff-format
3030
- id: ruff

src/virtualenv/create/via_global_ref/builtin/ref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def run(self, creator, symlinks):
137137
class ExePathRefToDest(PathRefToDest, ExePathRef):
138138
"""Link a exe path on the file system."""
139139

140-
def __init__(self, src, targets, dest, must=RefMust.NA, when=RefWhen.ANY) -> None: # noqa: PLR0913
140+
def __init__(self, src, targets, dest, must=RefMust.NA, when=RefWhen.ANY) -> None:
141141
ExePathRef.__init__(self, src, must, when)
142142
PathRefToDest.__init__(self, src, dest, must, when)
143143
if not self.FS_CASE_SENSITIVE:

src/virtualenv/seed/embed/via_app_data/pip_install/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def __init__(self, target_dir, version_info, executable, name) -> None:
194194
self.variants = {"", "X", "X.Y"}
195195
self._name = name
196196

197-
def _write_script(self, names, shebang, script_bytes, filenames, ext): # noqa: PLR0913
197+
def _write_script(self, names, shebang, script_bytes, filenames, ext):
198198
names.add(f"{self._name}{self.version_info[0]}.{self.version_info[1]}")
199199
super()._write_script(names, shebang, script_bytes, filenames, ext)
200200

tests/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def finish():
234234

235235

236236
# _no_coverage tells coverage_env to disable coverage injection for _no_coverage user.
237-
@pytest.fixture()
237+
@pytest.fixture
238238
def _no_coverage():
239239
pass
240240

@@ -291,7 +291,7 @@ def special_char_name():
291291
return result
292292

293293

294-
@pytest.fixture()
294+
@pytest.fixture
295295
def special_name_dir(tmp_path, special_char_name):
296296
return Path(str(tmp_path)) / special_char_name
297297

@@ -332,7 +332,7 @@ def change_env_var(key, value):
332332
del os.environ[key] # pragma: no cover
333333

334334

335-
@pytest.fixture()
335+
@pytest.fixture
336336
def temp_app_data(monkeypatch, tmp_path):
337337
app_data = tmp_path / "app-data"
338338
monkeypatch.setenv("VIRTUALENV_OVERRIDE_APP_DATA", str(app_data))
@@ -344,7 +344,7 @@ def for_py_version():
344344
return f"{sys.version_info.major}.{sys.version_info.minor}"
345345

346346

347-
@pytest.fixture()
347+
@pytest.fixture
348348
def _skip_if_test_in_system(session_app_data):
349349
current = PythonInfo.current(session_app_data)
350350
if current.system_executable is not None:
@@ -353,12 +353,12 @@ def _skip_if_test_in_system(session_app_data):
353353

354354
if IS_PYPY or (IS_WIN and sys.version_info[0:2] >= (3, 13)): # https://github.com/adamchainz/time-machine/issues/456
355355

356-
@pytest.fixture()
356+
@pytest.fixture
357357
def time_freeze(freezer):
358358
return freezer.move_to
359359

360360
else:
361361

362-
@pytest.fixture()
362+
@pytest.fixture
363363
def time_freeze(time_machine):
364364
return lambda s: time_machine.move_to(s, tick=False)

tests/integration/test_zipapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def zipapp_test_env(tmp_path_factory):
7575
shutil.rmtree(str(base_path))
7676

7777

78-
@pytest.fixture()
78+
@pytest.fixture
7979
def call_zipapp(zipapp, tmp_path, zipapp_test_env, temp_app_data): # noqa: ARG001
8080
def _run(*args):
8181
cmd = [str(zipapp_test_env), str(zipapp), "-vv", str(tmp_path / "env"), *list(args)]
@@ -84,7 +84,7 @@ def _run(*args):
8484
return _run
8585

8686

87-
@pytest.fixture()
87+
@pytest.fixture
8888
def call_zipapp_symlink(zipapp, tmp_path, zipapp_test_env, temp_app_data): # noqa: ARG001
8989
def _run(*args):
9090
symlinked = zipapp.parent / "symlinked_virtualenv.pyz"

tests/unit/activation/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
class ActivationTester:
18-
def __init__(self, of_class, session, cmd, activate_script, extension) -> None: # noqa: PLR0913
18+
def __init__(self, of_class, session, cmd, activate_script, extension) -> None:
1919
self.of_class = of_class
2020
self._creator = session.creator
2121
self._version_cmd = [cmd, "--version"]
@@ -241,7 +241,7 @@ def activation_python(request, tmp_path_factory, special_char_name, current_fast
241241
return session
242242

243243

244-
@pytest.fixture()
244+
@pytest.fixture
245245
def activation_tester(activation_python, monkeypatch, tmp_path, is_inside_ci):
246246
def _tester(tester_class):
247247
tester = tester_class(activation_python)

tests/unit/activation/test_powershell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from virtualenv.activation import PowerShellActivator
99

1010

11-
@pytest.mark.slow()
11+
@pytest.mark.slow
1212
def test_powershell(activation_tester_class, activation_tester, monkeypatch):
1313
monkeypatch.setenv("TERM", "xterm")
1414

tests/unit/config/cli/test_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from virtualenv.run import session_via_cli
1111

1212

13-
@pytest.fixture()
13+
@pytest.fixture
1414
def gen_parser_no_conf_env(monkeypatch, tmp_path):
1515
keys_to_delete = {key for key in os.environ if key.startswith("VIRTUALENV_")}
1616
for key in keys_to_delete:

tests/unit/config/test___main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_main():
2626
assert out
2727

2828

29-
@pytest.fixture()
29+
@pytest.fixture
3030
def raise_on_session_done(mocker):
3131
def _func(exception):
3232
from virtualenv.run import session_via_cli # noqa: PLC0415

tests/unit/config/test_env_var.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from virtualenv.run import session_via_cli
1313

1414

15-
@pytest.fixture()
15+
@pytest.fixture
1616
def _empty_conf(tmp_path, monkeypatch):
1717
conf = tmp_path / "conf.ini"
1818
monkeypatch.setenv(IniConfig.VIRTUALENV_CONFIG_FILE_ENV_VAR, str(conf))

tests/unit/create/test_interpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from virtualenv.run import cli_run
1010

1111

12-
@pytest.mark.slow()
12+
@pytest.mark.slow
1313
def test_failed_to_find_bad_spec():
1414
of_id = uuid4().hex
1515
with pytest.raises(RuntimeError) as context:

tests/unit/create/via_global_ref/builtin/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
sys.path.append(str(Path(__file__).parent))
1212

1313

14-
@pytest.fixture()
14+
@pytest.fixture
1515
def py_info(py_info_name):
1616
return read_fixture(py_info_name)
1717

1818

19-
@pytest.fixture()
19+
@pytest.fixture
2020
def mock_files(mocker):
2121
return lambda paths, files: path.mock_files(mocker, paths, files)
2222

2323

24-
@pytest.fixture()
24+
@pytest.fixture
2525
def mock_pypy_libs(mocker):
2626
return lambda pypy, libs: path.mock_pypy_libs(mocker, pypy, libs)

tests/unit/discovery/windows/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77

88

9-
@pytest.fixture()
9+
@pytest.fixture
1010
def _mock_registry(mocker): # noqa: C901
1111
from virtualenv.discovery.windows.pep514 import winreg # noqa: PLC0415
1212

@@ -78,7 +78,7 @@ def _mock_pyinfo(major, minor, arch, exe):
7878
return info
7979

8080

81-
@pytest.fixture()
81+
@pytest.fixture
8282
def _populate_pyinfo_cache(monkeypatch):
8383
"""Add metadata to virtualenv.discovery.cached_py_info._CACHE for all (mocked) registry entries"""
8484
import virtualenv.discovery.cached_py_info # noqa: PLC0415

tests/unit/seed/embed/test_bootstrap_link_via_app_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from pytest_mock import MockerFixture
2424

2525

26-
@pytest.mark.slow()
26+
@pytest.mark.slow
2727
@pytest.mark.parametrize("copies", [False, True] if fs_supports_symlink() else [True])
2828
def test_seed_link_via_app_data(tmp_path, coverage_env, current_fastest, copies):
2929
current = PythonInfo.current_system()
@@ -140,7 +140,7 @@ def read_only_dir(d):
140140
os.chmod(name, os.stat(name).st_mode | write)
141141

142142

143-
@pytest.fixture()
143+
@pytest.fixture
144144
def read_only_app_data(temp_app_data):
145145
temp_app_data.mkdir()
146146
with read_only_dir(temp_app_data):
@@ -204,7 +204,7 @@ def test_populated_read_only_cache_and_copied_app_data(tmp_path, current_fastest
204204
assert cli_run(["--read-only-app-data", *cmd])
205205

206206

207-
@pytest.mark.slow()
207+
@pytest.mark.slow
208208
@pytest.mark.parametrize("pkg", ["pip", "setuptools", "wheel"])
209209
@pytest.mark.usefixtures("session_app_data", "current_fastest", "coverage_env")
210210
def test_base_bootstrap_link_via_app_data_no(tmp_path, pkg):

tests/unit/seed/embed/test_pip_invoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from virtualenv.seed.wheels.embed import BUNDLE_FOLDER, BUNDLE_SUPPORT
1313

1414

15-
@pytest.mark.slow()
15+
@pytest.mark.slow
1616
@pytest.mark.parametrize("no", ["pip", "setuptools", "wheel", ""])
1717
def test_base_bootstrap_via_pip_invoke(tmp_path, coverage_env, mocker, current_fastest, no): # noqa: C901
1818
extra_search_dir = tmp_path / "extra"

tests/unit/seed/wheels/test_acquire.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_download_fails(mocker, for_py_version, session_app_data):
8888
] == exc.cmd
8989

9090

91-
@pytest.fixture()
91+
@pytest.fixture
9292
def downloaded_wheel(mocker):
9393
wheel = Wheel.from_path(Path("setuptools-0.0.0-py2.py3-none-any.whl"))
9494
return wheel, mocker.patch("virtualenv.seed.wheels.acquire.download_wheel", return_value=wheel)

0 commit comments

Comments
 (0)