Skip to content

Commit 06359ac

Browse files
chore(deps): bump the pre-commit-hooks group with 3 updates (jxmorris12#255)
Bumps mypy, ruff and zizmor versions (according to bellow versions). Bumps the pre-commit-hooks group with 3 updates: [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit), [https://github.com/pre-commit/mirrors-mypy](https://github.com/pre-commit/mirrors-mypy) and [https://github.com/zizmorcore/zizmor-pre-commit](https://github.com/zizmorcore/zizmor-pre-commit). Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.16.8 to 0.17.1 - [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases) - [Commits](astral-sh/ruff-pre-commit@v0.16.8...v0.17.1) Updates `https://github.com/pre-commit/mirrors-mypy` from v2.3.1 to 2.4.0 - [Commits](pre-commit/mirrors-mypy@v2.3.1...v2.4.0) Updates `https://github.com/zizmorcore/zizmor-pre-commit` from v1.30.1 to 1.31.1 - [Release notes](https://github.com/zizmorcore/zizmor-pre-commit/releases) - [Commits](zizmorcore/zizmor-pre-commit@v1.30.1...v1.31.1) --- updated-dependencies: - dependency-name: https://github.com/astral-sh/ruff-pre-commit dependency-version: 0.17.1 dependency-type: direct:production dependency-group: pre-commit-hooks - dependency-name: https://github.com/pre-commit/mirrors-mypy dependency-version: 2.4.0 dependency-type: direct:production dependency-group: pre-commit-hooks - dependency-name: https://github.com/zizmorcore/zizmor-pre-commit dependency-version: 1.31.1 dependency-type: direct:production dependency-group: pre-commit-hooks ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mdevolde <martin.devolder2@gmail.com>
1 parent 3d5cbad commit 06359ac

4 files changed

Lines changed: 296 additions & 205 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# Ruff for linting and formatting
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.16.8 # Keep in sync ruff version with pyproject.toml
4+
rev: v0.17.1 # Keep in sync ruff version with pyproject.toml
55
hooks:
66
# Run the linter
77
- id: ruff
@@ -11,14 +11,14 @@ repos:
1111

1212
# mypy for type checking
1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v2.3.1 # Keep in sync mypy version with pyproject.toml
14+
rev: v2.4.0 # Keep in sync mypy version with pyproject.toml
1515
hooks:
1616
- id: mypy
1717
args: [--config-file=pyproject.toml]
1818

1919
# zizmor for github actions linting
2020
- repo: https://github.com/zizmorcore/zizmor-pre-commit
21-
rev: v1.30.1 # Keep in sync zizmor version with pyproject.toml
21+
rev: v1.31.1 # Keep in sync zizmor version with pyproject.toml
2222
hooks:
2323
- id: zizmor
2424
args: [--no-progress, --fix, --persona=auditor]

‎pyproject.toml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ types = [
6161

6262
quality = [
6363
# Keep in sync mypy version with .pre-commit-config.yaml
64-
"mypy==2.3.1",
64+
"mypy==2.4.0",
6565
# Keep in sync ruff version with .pre-commit-config.yaml
66-
"ruff==0.16.8",
66+
"ruff==0.17.1",
6767
# Keep in sync zizmor version with .pre-commit-config.yaml
68-
"zizmor==1.29.0"
68+
"zizmor==1.31.1; python_version >= '3.11'",
69+
"zizmor==1.29.0; python_version < '3.11'",
6970
]
7071

7172

‎src/language_tool_python/server.py‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import time
1616
import urllib.parse
1717
import warnings
18-
from typing import TYPE_CHECKING, ClassVar, Literal, cast
18+
from typing import TYPE_CHECKING, ClassVar, Literal
1919

2020
import psutil
2121
import requests
@@ -54,7 +54,6 @@
5454
from collections.abc import Mapping
5555
from pathlib import Path
5656
from types import TracebackType
57-
from typing import IO
5857

5958
from .config_file import ConfigValue
6059

@@ -1237,11 +1236,8 @@ def _terminate_server(self) -> None:
12371236
with contextlib.suppress(ValueError):
12381237
_RUNNING_SERVER_PROCESSES.remove(self._server)
12391238

1240-
# stdin is IO[Any], so cast it back to the
1241-
# text stream that text=True actually gives us
1242-
stdin = cast("IO[str] | None", self._server.stdin)
1243-
if stdin:
1244-
stdin.close()
1239+
if self._server.stdin:
1240+
self._server.stdin.close()
12451241

12461242
# Release the server process object
12471243
self._server = None

0 commit comments

Comments
 (0)