Enable flake8-pyi's Y037 (#9686)

This commit is contained in:
Alex Waygood
2023-02-07 03:01:02 +00:00
committed by GitHub
parent c4c4bee8aa
commit 0ef9c3f8e8
38 changed files with 119 additions and 201 deletions

View File

@@ -1,7 +1,7 @@
from _typeshed import Self
from collections.abc import Callable, Sequence
from tkinter import Canvas, Frame, Misc, PhotoImage, Scrollbar
from typing import Any, ClassVar, Union, overload
from typing import Any, ClassVar, overload
from typing_extensions import TypeAlias
__all__ = [
@@ -133,7 +133,7 @@ __all__ = [
# alias we use for return types. Really, these two aliases should be the
# same, but as per the "no union returns" typeshed policy, we'll return
# Any instead.
_Color: TypeAlias = Union[str, tuple[float, float, float]]
_Color: TypeAlias = str | tuple[float, float, float]
_AnyColor: TypeAlias = Any
# TODO: Replace this with a TypedDict once it becomes standardized.