Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#2810)
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] authored Dec 20, 2024
1 parent 2f5569c commit baf2da4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions src/virtualenv/util/path/_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/activation/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit baf2da4

Please sign in to comment.