From baf2da4bad9d5f5d91ac130589024d0a40062d8b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 20:33:31 -0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#2810) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- src/virtualenv/util/path/_win.py | 8 ++++---- tests/unit/activation/conftest.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc0373e30..47b76e025 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-github-workflows args: ["--verbose"] @@ -24,13 +24,13 @@ repos: hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.0" + rev: "v0.8.3" hooks: - id: ruff-format - id: ruff args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] - repo: https://github.com/rbubley/mirrors-prettier - rev: "v3.3.3" + rev: "v3.4.2" hooks: - id: prettier additional_dependencies: diff --git a/src/virtualenv/util/path/_win.py b/src/virtualenv/util/path/_win.py index aa67ca770..6404cda64 100644 --- a/src/virtualenv/util/path/_win.py +++ b/src/virtualenv/util/path/_win.py @@ -6,13 +6,13 @@ def get_short_path_name(long_name): import ctypes # noqa: PLC0415 from ctypes import wintypes # noqa: PLC0415 - _GetShortPathNameW = ctypes.windll.kernel32.GetShortPathNameW # noqa: N806 - _GetShortPathNameW.argtypes = [wintypes.LPCWSTR, wintypes.LPWSTR, wintypes.DWORD] - _GetShortPathNameW.restype = wintypes.DWORD + GetShortPathNameW = ctypes.windll.kernel32.GetShortPathNameW # noqa: N806 + GetShortPathNameW.argtypes = [wintypes.LPCWSTR, wintypes.LPWSTR, wintypes.DWORD] + GetShortPathNameW.restype = wintypes.DWORD output_buf_size = 0 while True: output_buf = ctypes.create_unicode_buffer(output_buf_size) - needed = _GetShortPathNameW(long_name, output_buf, output_buf_size) + needed = GetShortPathNameW(long_name, output_buf, output_buf_size) if output_buf_size >= needed: return output_buf.value output_buf_size = needed diff --git a/tests/unit/activation/conftest.py b/tests/unit/activation/conftest.py index e320038ea..2d53d540c 100644 --- a/tests/unit/activation/conftest.py +++ b/tests/unit/activation/conftest.py @@ -212,8 +212,8 @@ def __call__(self, monkeypatch, tmp_path): stderr=subprocess.PIPE, env=env, ) - _out, _err = process.communicate() - err = _err.decode("utf-8") + _out, err_ = process.communicate() + err = err_.decode("utf-8") assert process.returncode assert self.non_source_fail_message in err