Skip to content

Commit d91586b

Browse files
renovate[bot]ntBre
andauthored
Update prek dependencies (#27293)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit) | repository | minor | `v0.15.22` → `v0.16.0` | | [astral-sh/uv-pre-commit](https://redirect.github.com/astral-sh/uv-pre-commit) | repository | minor | `0.11.32` → `0.12.0` | | [rbubley/mirrors-prettier](https://redirect.github.com/rbubley/mirrors-prettier) | repository | patch | `v3.9.5` → `v3.9.6` | | [zizmorcore/zizmor-pre-commit](https://redirect.github.com/zizmorcore/zizmor-pre-commit) | repository | minor | `v1.27.0` → `v1.28.0` | Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://redirect.github.com/renovatebot/renovate/discussions/new) if you have any questions. --- ### Release Notes <details> <summary>astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)</summary> ### [`v0.16.0`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.16.0) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.0) See: <https://github.com/astral-sh/ruff/releases/tag/0.16.0> </details> <details> <summary>astral-sh/uv-pre-commit (astral-sh/uv-pre-commit)</summary> ### [`v0.12.0`](https://redirect.github.com/astral-sh/uv-pre-commit/releases/tag/0.12.0) [Compare Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.33...0.12.0) See: <https://github.com/astral-sh/uv/releases/tag/0.12.0> ### [`v0.11.33`](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.32...0.11.33) [Compare Source](https://redirect.github.com/astral-sh/uv-pre-commit/compare/0.11.32...0.11.33) </details> <details> <summary>rbubley/mirrors-prettier (rbubley/mirrors-prettier)</summary> ### [`v3.9.6`](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.9.5...v3.9.6) [Compare Source](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.9.5...v3.9.6) </details> <details> <summary>zizmorcore/zizmor-pre-commit (zizmorcore/zizmor-pre-commit)</summary> ### [`v1.28.0`](https://redirect.github.com/zizmorcore/zizmor-pre-commit/releases/tag/v1.28.0) [Compare Source](https://redirect.github.com/zizmorcore/zizmor-pre-commit/compare/v1.27.0...v1.28.0) See: <https://github.com/zizmorcore/zizmor/releases/tag/v1.28.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 4am on Wednesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Brent Westbrook <[email protected]>
1 parent 7da4b8b commit d91586b

8 files changed

Lines changed: 45 additions & 32 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ repos:
5454
priority: 0
5555
# Prettier
5656
- repo: https://github.com/rbubley/mirrors-prettier
57-
rev: 9337a74165b178ae2c766f60bee7252a0f06f3e8 # frozen: v3.9.5
57+
rev: 0ee178619d696787ca73d210cc191d720868c631 # frozen: v3.9.6
5858
hooks:
5959
- id: prettier
6060
types: [yaml]
@@ -63,7 +63,7 @@ repos:
6363
# zizmor detects security vulnerabilities in GitHub Actions workflows.
6464
# Additional configuration for the tool is found in `.github/zizmor.yml`
6565
- repo: https://github.com/zizmorcore/zizmor-pre-commit
66-
rev: 64a97fb7fa63188393d3215c6e312f5f9c6d0f78 # frozen: v1.27.0
66+
rev: 067260dc5fe6ea86b7551bfd6f8b3ba4e6c93129 # frozen: v1.28.0
6767
hooks:
6868
- id: zizmor
6969
priority: 0
@@ -113,21 +113,21 @@ repos:
113113
priority: 0
114114

115115
- repo: https://github.com/astral-sh/uv-pre-commit
116-
rev: e3e6ef7d9bda544b2e795782dbd7d2a4fbd7eb6d # frozen: 0.11.32
116+
rev: 5900cba2cfe6d20f562458d4d308ac55569f92eb # frozen: 0.12.0
117117
hooks:
118118
- id: uv-lock
119119
priority: 0
120120

121121
- repo: https://github.com/astral-sh/ruff-pre-commit
122-
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
122+
rev: cb8c523fd4835aba42af70f4cad5568db4df0b6c # frozen: v0.16.0
123123
hooks:
124124
- id: ruff-format
125125
exclude: crates/ty_python_semantic/resources/corpus/
126126
priority: 0
127127

128128
# Priority 1: Second-pass fixers (e.g., markdownlint-fix runs after mdformat).
129129
- repo: https://github.com/astral-sh/ruff-pre-commit
130-
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
130+
rev: cb8c523fd4835aba42af70f4cad5568db4df0b6c # frozen: v0.16.0
131131
hooks:
132132
- id: ruff-check
133133
args: [--fix, --exit-non-zero-on-fix]
@@ -150,7 +150,7 @@ repos:
150150

151151
# Priority 2: ruffen-docs runs after markdownlint-fix (both modify markdown).
152152
- repo: https://github.com/astral-sh/ruff-pre-commit
153-
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
153+
rev: cb8c523fd4835aba42af70f4cad5568db4df0b6c # frozen: v0.16.0
154154
hooks:
155155
- id: ruff-format
156156
name: mdtest format

‎scripts/ty_benchmark/src/benchmark/__init__.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
import logging
44
import subprocess
55
import sys
6+
from collections.abc import Mapping
67
from pathlib import Path
7-
from typing import Mapping, NamedTuple
8+
from typing import NamedTuple
89

910
if sys.platform == "win32":
1011
import mslex as shlex
1112
else:
1213
import shlex
1314

1415

16+
logger = logging.getLogger(__name__)
17+
18+
1519
class Command(NamedTuple):
1620
name: str
1721
"""The name of the command to benchmark."""
@@ -76,6 +80,6 @@ def run(self, *, cwd: Path | None = None, env: Mapping[str, str]) -> None:
7680
for command in self.commands:
7781
args.append(shlex.join(command.command))
7882

79-
logging.info(f"Running {args}")
83+
logger.info(f"Running {args}")
8084

81-
subprocess.run(args, cwd=cwd, env=env)
85+
subprocess.run(args, cwd=cwd, env=env, check=True)

‎scripts/ty_benchmark/src/benchmark/lsp_client.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from lsprotocol import types as lsp
1010
from pygls.lsp.client import LanguageClient
1111

12+
logger = logging.getLogger(__name__)
13+
1214

1315
def _register_notebook_structure_hooks(converter):
1416
"""Register structure hooks for notebook document types to work around cattrs deserialization issues."""
@@ -64,7 +66,7 @@ def __init__(
6466
def publish_diagnostics(
6567
client: LSPClient, params: lsp.PublishDiagnosticsParams
6668
):
67-
logging.info(
69+
logger.info(
6870
f"Received publish_diagnostics for {params.uri} with version={params.version}, diagnostics count={len(params.diagnostics)}"
6971
)
7072
future = self.diagnostics.get(params.uri, None)
@@ -78,11 +80,11 @@ def publish_diagnostics(
7880
@self.feature(lsp.WINDOW_LOG_MESSAGE)
7981
def log_message(client: LSPClient, params: lsp.LogMessageParams):
8082
if params.type == lsp.MessageType.Error:
81-
logging.error(f"server error: {params.message}")
83+
logger.error(f"server error: {params.message}")
8284
elif params.type == lsp.MessageType.Warning:
83-
logging.warning(f"server warning: {params.message}")
85+
logger.warning(f"server warning: {params.message}")
8486
else:
85-
logging.info(f"server info: {params.message}")
87+
logger.info(f"server info: {params.message}")
8688

8789
@override
8890
async def initialize_async(
@@ -92,9 +94,7 @@ async def initialize_async(
9294

9395
self.server_capabilities = result.capabilities
9496

95-
logging.info(
96-
f"Pull diagnostic support: {self.server_supports_pull_diagnostics}"
97-
)
97+
logger.info(f"Pull diagnostic support: {self.server_supports_pull_diagnostics}")
9898

9999
return result
100100

@@ -154,9 +154,9 @@ async def wait_for_push_diagnostics_async(
154154
self.diagnostics[path.as_uri()] = future
155155

156156
try:
157-
logging.info(f"Waiting for push diagnostics for {path}")
157+
logger.info(f"Waiting for push diagnostics for {path}")
158158
result = await asyncio.wait_for(future, timeout)
159-
logging.info(f"Awaited push diagnostics for {path}")
159+
logger.info(f"Awaited push diagnostics for {path}")
160160
finally:
161161
self.diagnostics.pop(path.as_uri())
162162

‎scripts/ty_benchmark/src/benchmark/projects.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import logging
22
import subprocess
33
import sys
4+
from collections.abc import Sequence
45
from pathlib import Path
56
from typing import Final, Literal, NamedTuple
67

8+
logger = logging.getLogger(__name__)
9+
710

811
class Project(NamedTuple):
912
name: str
@@ -26,10 +29,10 @@ class Project(NamedTuple):
2629
skip: str | None = None
2730
"""The project is skipped from benchmarking if not `None`."""
2831

29-
include: list[str] = []
32+
include: Sequence[str] = ()
3033
"""The directories and files to check. If empty, checks the current directory"""
3134

32-
exclude: list[str] = []
35+
exclude: Sequence[str] = ()
3336
"""The directories and files to exclude from checks."""
3437

3538
edit: IncrementalEdit | None = None
@@ -39,7 +42,7 @@ def clone(self, checkout_dir: Path) -> None:
3942
if (checkout_dir / ".git").exists():
4043
return
4144

42-
logging.debug(f"Cloning {self.repository} to {checkout_dir}")
45+
logger.debug(f"Cloning {self.repository} to {checkout_dir}")
4346

4447
try:
4548
# git doesn't support cloning a specific revision.
@@ -94,7 +97,7 @@ def clone(self, checkout_dir: Path) -> None:
9497
except subprocess.CalledProcessError as e:
9598
raise RuntimeError(f"Failed to clone {self.name}:\n\n{e.stderr}") from e
9699

97-
logging.info(f"Cloned {self.name} to {checkout_dir}.")
100+
logger.info(f"Cloned {self.name} to {checkout_dir}.")
98101

99102

100103
class IncrementalEdit(NamedTuple):

‎scripts/ty_benchmark/src/benchmark/run.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def main() -> None:
8787

8888
args = parser.parse_args()
8989
logging.basicConfig(
90-
level=logging.INFO if args.verbose else logging.WARN,
90+
level=logging.INFO if args.verbose else logging.WARNING,
9191
format="%(asctime)s %(levelname)s %(message)s",
9292
datefmt="%Y-%m-%d %H:%M:%S",
9393
)
@@ -165,15 +165,15 @@ def main() -> None:
165165
continue
166166

167167
if not first:
168-
print("")
168+
print()
169169
print(
170170
"-------------------------------------------------------------------------------"
171171
)
172-
print("")
172+
print()
173173

174174
print(f"{project.name}")
175175
print("-" * len(project.name))
176-
print("")
176+
print()
177177

178178
if args.snapshot:
179179
# Get the directory where run.py is located to find snapshots directory.

‎scripts/ty_benchmark/src/benchmark/snapshot.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
import logging
55
import re
66
import subprocess
7+
from collections.abc import Mapping
78
from pathlib import Path
8-
from typing import Mapping, NamedTuple
9+
from typing import NamedTuple
910

1011
from benchmark import Command
1112

13+
logger = logging.getLogger(__name__)
14+
1215

1316
def normalize_output(output: str, cwd: Path) -> str:
1417
"""Normalize output by replacing absolute paths with relative placeholders."""
@@ -66,7 +69,7 @@ def run(self, *, cwd: Path, env: Mapping[str, str]):
6669

6770
# Run the prepare command if provided.
6871
if command.prepare:
69-
logging.info(f"Running prepare: {command.prepare}")
72+
logger.info(f"Running prepare: {command.prepare}")
7073
subprocess.run(
7174
command.prepare,
7275
cwd=cwd,
@@ -76,13 +79,14 @@ def run(self, *, cwd: Path, env: Mapping[str, str]):
7679
)
7780

7881
# Run the actual command and capture output.
79-
logging.info(f"Running {command.command}")
82+
logger.info(f"Running {command.command}")
8083
result = subprocess.run(
8184
command.command,
8285
cwd=cwd,
8386
env=env,
8487
capture_output=True,
8588
text=True,
89+
check=False,
8690
)
8791

8892
# Get the actual output and combine stdout and stderr for the snapshot.

‎scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
@pytest.fixture(scope="module", params=ALL_PROJECTS, ids=lambda p: p.name)
4141
def project_setup(
4242
request,
43-
) -> Generator[tuple[Project, Venv], None, None]:
43+
) -> Generator[tuple[Project, Venv]]:
4444
"""Set up a project and its venv once per module (shared across all tests for this project)."""
4545
project: Project = request.param
4646

@@ -187,7 +187,7 @@ def edited_file_path(self) -> Path:
187187
def absolute_file_path(self, file_path: str) -> Path:
188188
return self.cwd / file_path
189189

190-
def files_to_check(self) -> Generator[Path, None, None]:
190+
def files_to_check(self) -> Generator[Path]:
191191
yield self.edited_file_path
192192

193193
for file in self.edit.affected_files:

‎scripts/ty_benchmark/src/benchmark/venv.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from dataclasses import dataclass
77
from pathlib import Path
88

9+
logger = logging.getLogger(__name__)
10+
911

1012
@dataclass(frozen=True, kw_only=True, slots=True)
1113
class Venv:
@@ -63,7 +65,7 @@ def install(
6365
) -> None:
6466
"""Installs the dependencies required to type check the project."""
6567

66-
logging.debug(f"Installing dependencies: {', '.join(pip_install_args)}")
68+
logger.debug(f"Installing dependencies: {', '.join(pip_install_args)}")
6769
mypy_overrides = Path(__file__).with_name("mypy-overrides.txt")
6870

6971
command = [

0 commit comments

Comments
 (0)