Skip to content

Commit c193cd2

Browse files
authored
Upgrade Black and Ruff (#13443)
1 parent 89b49d2 commit c193cd2

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
args: [--fix=lf]
1212
- id: check-case-conflict
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.8.6 # must match requirements-tests.txt
14+
rev: v0.9.3 # must match requirements-tests.txt
1515
hooks:
1616
- id: ruff
1717
name: Run ruff on stubs, tests and scripts
@@ -27,7 +27,7 @@ repos:
2727
- "--unsafe-fixes"
2828
files: '.*test_cases/.+\.py$'
2929
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 24.10.0
30+
rev: 25.1.0
3131
hooks:
3232
- id: black
3333
- repo: https://github.com/pycqa/flake8

requirements-tests.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ packaging==24.2
1313
pathspec>=0.11.1
1414
pre-commit
1515
# Required by create_baseline_stubs.py. Must match .pre-commit-config.yaml.
16-
ruff==0.8.5
16+
ruff==0.9.3
1717
stubdefaulter==0.1.0
1818
termcolor>=2.3
1919
tomli==2.2.1

stdlib/importlib/resources/_common.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if sys.version_info >= (3, 11):
1616
Anchor: TypeAlias = Package
1717

1818
def package_to_anchor(
19-
func: Callable[[Anchor | None], Traversable]
19+
func: Callable[[Anchor | None], Traversable],
2020
) -> Callable[[Anchor | None, Anchor | None], Traversable]: ...
2121
@overload
2222
def files(anchor: Anchor | None = None) -> Traversable: ...

stdlib/inspect.pyi

+3-3
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ if sys.version_info >= (3, 12):
370370
AGEN_CLOSED: Final = "AGEN_CLOSED"
371371

372372
def getasyncgenstate(
373-
agen: AsyncGenerator[Any, Any]
373+
agen: AsyncGenerator[Any, Any],
374374
) -> Literal["AGEN_CREATED", "AGEN_RUNNING", "AGEN_SUSPENDED", "AGEN_CLOSED"]: ...
375375
def getasyncgenlocals(agen: AsyncGeneratorType[Any, Any]) -> dict[str, Any]: ...
376376

@@ -590,7 +590,7 @@ GEN_SUSPENDED: Final = "GEN_SUSPENDED"
590590
GEN_CLOSED: Final = "GEN_CLOSED"
591591

592592
def getgeneratorstate(
593-
generator: Generator[Any, Any, Any]
593+
generator: Generator[Any, Any, Any],
594594
) -> Literal["GEN_CREATED", "GEN_RUNNING", "GEN_SUSPENDED", "GEN_CLOSED"]: ...
595595

596596
CORO_CREATED: Final = "CORO_CREATED"
@@ -599,7 +599,7 @@ CORO_SUSPENDED: Final = "CORO_SUSPENDED"
599599
CORO_CLOSED: Final = "CORO_CLOSED"
600600

601601
def getcoroutinestate(
602-
coroutine: Coroutine[Any, Any, Any]
602+
coroutine: Coroutine[Any, Any, Any],
603603
) -> Literal["CORO_CREATED", "CORO_RUNNING", "CORO_SUSPENDED", "CORO_CLOSED"]: ...
604604
def getgeneratorlocals(generator: Generator[Any, Any, Any]) -> dict[str, Any]: ...
605605
def getcoroutinelocals(coroutine: Coroutine[Any, Any, Any]) -> dict[str, Any]: ...

stdlib/ipaddress.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def ip_network(
1818
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int], strict: bool = True
1919
) -> IPv4Network | IPv6Network: ...
2020
def ip_interface(
21-
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int]
21+
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int],
2222
) -> IPv4Interface | IPv6Interface: ...
2323

2424
class _IPAddressBase:

stubs/pyinstaller/pyi_splash/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ def update_text(msg: str) -> None: ...
1010
def close() -> None: ...
1111

1212
CLOSE_CONNECTION: Final = b"\x04"
13-
FLUSH_CHARACTER: Final = b"\x0D"
13+
FLUSH_CHARACTER: Final = b"\x0d"

stubs/pyserial/serial/threaded/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from typing_extensions import Self
77

88
from serial import Serial
99

10-
_P = TypeVar("_P", bound=Protocol, default="Protocol") # noqa: Y020
10+
_P = TypeVar("_P", bound=Protocol, default=Protocol)
1111

1212
class Protocol:
1313
def connection_made(self, transport: ReaderThread[Self]) -> None: ...

stubs/reportlab/reportlab/lib/colors.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def HexColor(val: str | int, htmlOnly: bool = False, hasAlpha: bool = False) ->
111111
def linearlyInterpolatedColor(c0: _ColorT, c1: _ColorT, x0: float, x1: float, x: float) -> _ColorT: ...
112112
@overload
113113
def obj_R_G_B(
114-
c: Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float]
114+
c: Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float],
115115
) -> tuple[float, float, float]: ...
116116
@overload
117117
def obj_R_G_B(c: None) -> None: ...

0 commit comments

Comments
 (0)