From 8b763b82f4b1f3c392714a9561672fe23ea2cdf2 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 8 Jan 2026 16:35:00 +0000 Subject: [PATCH] Run pyupgrade --- flake8_pyi/checker.py | 3 ++- flake8_pyi/visitor.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flake8_pyi/checker.py b/flake8_pyi/checker.py index 889ae9c..8e3c152 100644 --- a/flake8_pyi/checker.py +++ b/flake8_pyi/checker.py @@ -3,8 +3,9 @@ import ast import logging import re +from collections.abc import Iterator from dataclasses import dataclass -from typing import ClassVar, Iterator +from typing import ClassVar from flake8.options.manager import OptionManager diff --git a/flake8_pyi/visitor.py b/flake8_pyi/visitor.py index 35d6329..4bd8aeb 100644 --- a/flake8_pyi/visitor.py +++ b/flake8_pyi/visitor.py @@ -12,7 +12,7 @@ from functools import cached_property, partial from itertools import chain, groupby, zip_longest from keyword import iskeyword -from typing import TYPE_CHECKING, Literal, NamedTuple, Protocol +from typing import TYPE_CHECKING, Literal, NamedTuple, Protocol, TypeAlias, TypeGuard from . import checker, errors from .errors import Error @@ -21,7 +21,7 @@ # We don't have typing_extensions as a runtime dependency, # but all our annotations are stringized due to __future__ annotations, # and mypy thinks typing_extensions is part of the stdlib. - from typing_extensions import TypeAlias, TypeGuard, TypeIs + from typing_extensions import TypeIs if sys.version_info >= (3, 12): _TypeAliasNodeType: TypeAlias = ast.TypeAlias | ast.AnnAssign