Skip to content

Commit 7cbed79

Browse files
[pre-commit.ci] pre-commit autoupdate (#2723)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 09c1c69 commit 7cbed79

File tree

5 files changed

+60
-41
lines changed

5 files changed

+60
-41
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 4 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.2
8+
rev: 0.28.3
99
hooks:
1010
- id: check-github-workflows
1111
args: [ "--verbose" ]
@@ -20,12 +20,11 @@ repos:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "1.8.0"
23+
rev: "2.0.4"
2424
hooks:
2525
- id: pyproject-fmt
26-
additional_dependencies: ["tox>=4.12.1"]
2726
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "v0.4.3"
27+
rev: "v0.4.4"
2928
hooks:
3029
- id: ruff-format
3130
- id: ruff

pyproject.toml

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ keywords = [
1515
"virtual",
1616
]
1717
license = "MIT"
18-
maintainers = [{ name = "Bernat Gabor", email = "gaborjbernat@gmail.com" }]
18+
maintainers = [
19+
{ name = "Bernat Gabor", email = "gaborjbernat@gmail.com" },
20+
]
1921
requires-python = ">=3.7"
2022
classifiers = [
2123
"Development Status :: 5 - Production/Stable",
@@ -31,7 +33,6 @@ classifiers = [
3133
"Programming Language :: Python :: 3.10",
3234
"Programming Language :: Python :: 3.11",
3335
"Programming Language :: Python :: 3.12",
34-
"Programming Language :: Python :: 3.13",
3536
"Programming Language :: Python :: Implementation :: CPython",
3637
"Programming Language :: Python :: Implementation :: PyPy",
3738
"Topic :: Software Development :: Libraries",
@@ -44,7 +45,7 @@ dynamic = [
4445
dependencies = [
4546
"distlib<1,>=0.3.7",
4647
"filelock<4,>=3.12.2",
47-
'importlib-metadata>=6.6; python_version < "3.8"',
48+
"importlib-metadata>=6.6; python_version<'3.8'",
4849
"platformdirs<5,>=3.9.1",
4950
]
5051
optional-dependencies.docs = [
@@ -63,50 +64,57 @@ optional-dependencies.test = [
6364
"packaging>=23.1",
6465
"pytest>=7.4",
6566
"pytest-env>=0.8.2",
66-
'pytest-freezer>=0.4.8; platform_python_implementation == "PyPy"',
67+
"pytest-freezer>=0.4.8; platform_python_implementation=='PyPy'",
6768
"pytest-mock>=3.11.1",
6869
"pytest-randomly>=3.12",
6970
"pytest-timeout>=2.1",
7071
"setuptools>=68",
71-
'time-machine>=2.10; platform_python_implementation == "CPython"',
72+
"time-machine>=2.10; platform_python_implementation=='CPython'",
7273
]
7374
urls.Documentation = "https://virtualenv.pypa.io"
7475
urls.Homepage = "https://github.com/pypa/virtualenv"
7576
urls.Source = "https://github.com/pypa/virtualenv"
7677
urls.Tracker = "https://github.com/pypa/virtualenv/issues"
7778
scripts.virtualenv = "virtualenv.__main__:run_with_catch"
78-
[project.entry-points."virtualenv.activate"]
79-
bash = "virtualenv.activation.bash:BashActivator"
80-
batch = "virtualenv.activation.batch:BatchActivator"
81-
cshell = "virtualenv.activation.cshell:CShellActivator"
82-
fish = "virtualenv.activation.fish:FishActivator"
83-
nushell = "virtualenv.activation.nushell:NushellActivator"
84-
powershell = "virtualenv.activation.powershell:PowerShellActivator"
85-
python = "virtualenv.activation.python:PythonActivator"
86-
[project.entry-points."virtualenv.create"]
87-
cpython3-mac-brew = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsBrew"
88-
cpython3-mac-framework = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsFramework"
89-
cpython3-posix = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Posix"
90-
cpython3-win = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Windows"
91-
pypy3-posix = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:PyPy3Posix"
92-
pypy3-win = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:Pypy3Windows"
93-
venv = "virtualenv.create.via_global_ref.venv:Venv"
94-
[project.entry-points."virtualenv.discovery"]
95-
builtin = "virtualenv.discovery.builtin:Builtin"
96-
[project.entry-points."virtualenv.seed"]
97-
app-data = "virtualenv.seed.embed.via_app_data.via_app_data:FromAppData"
98-
pip = "virtualenv.seed.embed.pip_invoke:PipInvoke"
79+
entry-points."virtualenv.activate".bash = "virtualenv.activation.bash:BashActivator"
80+
entry-points."virtualenv.activate".batch = "virtualenv.activation.batch:BatchActivator"
81+
entry-points."virtualenv.activate".cshell = "virtualenv.activation.cshell:CShellActivator"
82+
entry-points."virtualenv.activate".fish = "virtualenv.activation.fish:FishActivator"
83+
entry-points."virtualenv.activate".nushell = "virtualenv.activation.nushell:NushellActivator"
84+
entry-points."virtualenv.activate".powershell = "virtualenv.activation.powershell:PowerShellActivator"
85+
entry-points."virtualenv.activate".python = "virtualenv.activation.python:PythonActivator"
86+
entry-points."virtualenv.create".cpython3-mac-brew = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsBrew"
87+
entry-points."virtualenv.create".cpython3-mac-framework = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsFramework"
88+
entry-points."virtualenv.create".cpython3-posix = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Posix"
89+
entry-points."virtualenv.create".cpython3-win = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Windows"
90+
entry-points."virtualenv.create".pypy3-posix = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:PyPy3Posix"
91+
entry-points."virtualenv.create".pypy3-win = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:Pypy3Windows"
92+
entry-points."virtualenv.create".venv = "virtualenv.create.via_global_ref.venv:Venv"
93+
entry-points."virtualenv.discovery".builtin = "virtualenv.discovery.builtin:Builtin"
94+
entry-points."virtualenv.seed".app-data = "virtualenv.seed.embed.via_app_data.via_app_data:FromAppData"
95+
entry-points."virtualenv.seed".pip = "virtualenv.seed.embed.pip_invoke:PipInvoke"
9996

10097
[tool.hatch]
10198
build.hooks.vcs.version-file = "src/virtualenv/version.py"
102-
build.targets.sdist.include = ["/src", "/tests", "/tasks", "/tox.ini"]
99+
build.targets.sdist.include = [
100+
"/src",
101+
"/tests",
102+
"/tasks",
103+
"/tox.ini",
104+
]
103105
version.source = "vcs"
104106

105107
[tool.ruff]
106108
line-length = 120
107109
target-version = "py37"
108-
lint.isort = { known-first-party = ["virtualenv"], required-imports = ["from __future__ import annotations"] }
109-
lint.select = ["ALL"]
110+
lint.isort = { known-first-party = [
111+
"virtualenv",
112+
], required-imports = [
113+
"from __future__ import annotations",
114+
] }
115+
lint.select = [
116+
"ALL",
117+
]
110118
lint.ignore = [
111119
"CPY", # No copyright header
112120
"ANN", # no type checking added yet
@@ -144,10 +152,14 @@ builtin = "clear,usage,en-GB_to_en-US"
144152
count = true
145153

146154
[tool.pytest.ini_options]
147-
markers = ["slow"]
155+
markers = [
156+
"slow",
157+
]
148158
timeout = 600
149159
addopts = "--showlocals --no-success-flaky-report"
150-
env = ["PYTHONIOENCODING=utf-8"]
160+
env = [
161+
"PYTHONIOENCODING=utf-8",
162+
]
151163

152164
[tool.coverage]
153165
html.show_contexts = true
@@ -159,12 +171,20 @@ report.omit = [
159171
"**/src/virtualenv/activation/python/activate_this.py",
160172
"**/src/virtualenv/seed/wheels/embed/pip-*.whl/pip/**",
161173
]
162-
paths.source = ["src", "**/site-packages"]
174+
paths.source = [
175+
"src",
176+
"**/site-packages",
177+
]
163178
report.fail_under = 76
164-
run.source = ["${_COVERAGE_SRC}", "tests"]
179+
run.source = [
180+
"${_COVERAGE_SRC}",
181+
"tests",
182+
]
165183
run.dynamic_context = "test_function"
166184
run.parallel = true
167-
run.plugins = ["covdefaults"]
185+
run.plugins = [
186+
"covdefaults",
187+
]
168188
run.relative_files = true
169189

170190
[tool.towncrier]

src/virtualenv/discovery/py_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def from_exe( # noqa: PLR0913
383383
if isinstance(proposed, PythonInfo) and resolve_to_host:
384384
try:
385385
proposed = proposed._resolve_to_system(app_data, proposed) # noqa: SLF001
386-
except Exception as exception: # noqa: BLE001
386+
except Exception as exception:
387387
if raise_on_error:
388388
raise
389389
logging.info("ignore %s due cannot resolve system due to %r", proposed.original_executable, exception)

tasks/make_zipapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_zipapp(dest, packages):
5252
print(f"zipapp created at {dest}") # noqa: T201
5353

5454

55-
def write_packages_to_zipapp(base, dist, modules, packages, zip_app): # noqa: C901
55+
def write_packages_to_zipapp(base, dist, modules, packages, zip_app): # noqa: C901, PLR0912
5656
has = set()
5757
for name, p_w_v in packages.items(): # noqa: PLR1702
5858
for platform, w_v in p_w_v.items():

tests/unit/activation/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_version(self, raise_on_fail):
4141
encoding="utf-8",
4242
)
4343
out, err = process.communicate()
44-
except Exception as exception: # noqa: BLE001
44+
except Exception as exception:
4545
self._version = exception
4646
if raise_on_fail:
4747
raise

0 commit comments

Comments
 (0)