diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af76552..6fd323c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.10 + rev: v0.11.0 hooks: - id: ruff args: [--fix] diff --git a/flake8_async/visitors/visitor91x.py b/flake8_async/visitors/visitor91x.py index adee79a..c8b4e98 100644 --- a/flake8_async/visitors/visitor91x.py +++ b/flake8_async/visitors/visitor91x.py @@ -500,7 +500,7 @@ def visit_FunctionDef(self, node: cst.FunctionDef) -> bool: # visit body # we're not gonna get FlattenSentinel or RemovalSentinel - self.new_body = cast(cst.BaseSuite, node.body.visit(self)) + self.new_body = cast("cst.BaseSuite", node.body.visit(self)) # we know that leave_FunctionDef for this FunctionDef will run immediately after # this function exits so we don't need to worry about save_state for new_body diff --git a/tests/check_changelog_and_version.py b/tests/check_changelog_and_version.py index ef3c706..c8adb32 100755 --- a/tests/check_changelog_and_version.py +++ b/tests/check_changelog_and_version.py @@ -8,6 +8,8 @@ from pathlib import Path from typing import TYPE_CHECKING, NamedTuple, TypeVar +from typing_extensions import Self + if TYPE_CHECKING: from collections.abc import Iterable @@ -27,7 +29,7 @@ class Version(NamedTuple): patch: int @classmethod - def from_string(cls: type[T], string: str) -> T: + def from_string(cls, string: str) -> Self: return cls(*map(int, string.split("."))) def __str__(self) -> str: