diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad7df495b6de..66fd399115a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/requirements-tests.txt b/requirements-tests.txt index c627f6520a0b..5cf8a532aa30 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -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 diff --git a/stdlib/importlib/resources/_common.pyi b/stdlib/importlib/resources/_common.pyi index f04f70f25e23..f1056f62ed6e 100644 --- a/stdlib/importlib/resources/_common.pyi +++ b/stdlib/importlib/resources/_common.pyi @@ -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: ... diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index c6836c837eaa..43b3dd529887 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -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]: ... diff --git a/stdlib/ipaddress.pyi b/stdlib/ipaddress.pyi index 0563ed9b00ba..e8e81abc6f79 100644 --- a/stdlib/ipaddress.pyi +++ b/stdlib/ipaddress.pyi @@ -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: diff --git a/stubs/pyinstaller/pyi_splash/__init__.pyi b/stubs/pyinstaller/pyi_splash/__init__.pyi index f2e324d4d7ed..6be5e623decc 100644 --- a/stubs/pyinstaller/pyi_splash/__init__.pyi +++ b/stubs/pyinstaller/pyi_splash/__init__.pyi @@ -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" diff --git a/stubs/pyserial/serial/threaded/__init__.pyi b/stubs/pyserial/serial/threaded/__init__.pyi index d32847eb5d10..4cc3c15648ee 100644 --- a/stubs/pyserial/serial/threaded/__init__.pyi +++ b/stubs/pyserial/serial/threaded/__init__.pyi @@ -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: ... diff --git a/stubs/reportlab/reportlab/lib/colors.pyi b/stubs/reportlab/reportlab/lib/colors.pyi index 8ed8afe8e5b3..ed615bae2e1c 100644 --- a/stubs/reportlab/reportlab/lib/colors.pyi +++ b/stubs/reportlab/reportlab/lib/colors.pyi @@ -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: ...