Upgrade Black and Ruff (#13443)

This commit is contained in:
Alex Waygood
2025-01-29 22:47:58 +00:00
committed by GitHub
parent 89b49d207b
commit c193cd2a36
8 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ repos:
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6 # must match requirements-tests.txt
rev: v0.9.3 # must match requirements-tests.txt
hooks:
- id: ruff
name: Run ruff on stubs, tests and scripts
@@ -27,7 +27,7 @@ repos:
- "--unsafe-fixes"
files: '.*test_cases/.+\.py$'
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8

View File

@@ -13,7 +13,7 @@ packaging==24.2
pathspec>=0.11.1
pre-commit
# Required by create_baseline_stubs.py. Must match .pre-commit-config.yaml.
ruff==0.8.5
ruff==0.9.3
stubdefaulter==0.1.0
termcolor>=2.3
tomli==2.2.1

View File

@@ -16,7 +16,7 @@ if sys.version_info >= (3, 11):
Anchor: TypeAlias = Package
def package_to_anchor(
func: Callable[[Anchor | None], Traversable]
func: Callable[[Anchor | None], Traversable],
) -> Callable[[Anchor | None, Anchor | None], Traversable]: ...
@overload
def files(anchor: Anchor | None = None) -> Traversable: ...

View File

@@ -370,7 +370,7 @@ if sys.version_info >= (3, 12):
AGEN_CLOSED: Final = "AGEN_CLOSED"
def getasyncgenstate(
agen: AsyncGenerator[Any, Any]
agen: AsyncGenerator[Any, Any],
) -> Literal["AGEN_CREATED", "AGEN_RUNNING", "AGEN_SUSPENDED", "AGEN_CLOSED"]: ...
def getasyncgenlocals(agen: AsyncGeneratorType[Any, Any]) -> dict[str, Any]: ...
@@ -590,7 +590,7 @@ GEN_SUSPENDED: Final = "GEN_SUSPENDED"
GEN_CLOSED: Final = "GEN_CLOSED"
def getgeneratorstate(
generator: Generator[Any, Any, Any]
generator: Generator[Any, Any, Any],
) -> Literal["GEN_CREATED", "GEN_RUNNING", "GEN_SUSPENDED", "GEN_CLOSED"]: ...
CORO_CREATED: Final = "CORO_CREATED"
@@ -599,7 +599,7 @@ CORO_SUSPENDED: Final = "CORO_SUSPENDED"
CORO_CLOSED: Final = "CORO_CLOSED"
def getcoroutinestate(
coroutine: Coroutine[Any, Any, Any]
coroutine: Coroutine[Any, Any, Any],
) -> Literal["CORO_CREATED", "CORO_RUNNING", "CORO_SUSPENDED", "CORO_CLOSED"]: ...
def getgeneratorlocals(generator: Generator[Any, Any, Any]) -> dict[str, Any]: ...
def getcoroutinelocals(coroutine: Coroutine[Any, Any, Any]) -> dict[str, Any]: ...

View File

@@ -18,7 +18,7 @@ def ip_network(
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int], strict: bool = True
) -> IPv4Network | IPv6Network: ...
def ip_interface(
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int]
address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int],
) -> IPv4Interface | IPv6Interface: ...
class _IPAddressBase:

View File

@@ -10,4 +10,4 @@ def update_text(msg: str) -> None: ...
def close() -> None: ...
CLOSE_CONNECTION: Final = b"\x04"
FLUSH_CHARACTER: Final = b"\x0D"
FLUSH_CHARACTER: Final = b"\x0d"

View File

@@ -7,7 +7,7 @@ from typing_extensions import Self
from serial import Serial
_P = TypeVar("_P", bound=Protocol, default="Protocol") # noqa: Y020
_P = TypeVar("_P", bound=Protocol, default=Protocol)
class Protocol:
def connection_made(self, transport: ReaderThread[Self]) -> None: ...

View File

@@ -111,7 +111,7 @@ def HexColor(val: str | int, htmlOnly: bool = False, hasAlpha: bool = False) ->
def linearlyInterpolatedColor(c0: _ColorT, c1: _ColorT, x0: float, x1: float, x: float) -> _ColorT: ...
@overload
def obj_R_G_B(
c: Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float]
c: Color | list[float] | tuple[float, float, float, float] | tuple[float, float, float],
) -> tuple[float, float, float]: ...
@overload
def obj_R_G_B(c: None) -> None: ...