mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
ruff: Fix UP007 Use X | Y for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e08a24e47f
commit
531b34cb4c
@@ -5,7 +5,7 @@ import sys
|
||||
from contextlib import contextmanager
|
||||
from io import SEEK_SET, TextIOWrapper
|
||||
from types import TracebackType
|
||||
from typing import IO, TYPE_CHECKING, Iterable, Iterator, Optional
|
||||
from typing import IO, TYPE_CHECKING, Iterable, Iterator
|
||||
|
||||
from typing_extensions import override
|
||||
|
||||
@@ -111,7 +111,7 @@ class WrappedIO(IO[bytes]):
|
||||
return self.stream.tell()
|
||||
|
||||
@override
|
||||
def truncate(self, size: Optional[int] = None) -> int:
|
||||
def truncate(self, size: int | None = None) -> int:
|
||||
return self.truncate(size)
|
||||
|
||||
@override
|
||||
@@ -147,9 +147,9 @@ class WrappedIO(IO[bytes]):
|
||||
@override
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[type[BaseException]],
|
||||
exc_value: Optional[BaseException],
|
||||
traceback: Optional[TracebackType],
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_value: BaseException | None,
|
||||
traceback: TracebackType | None,
|
||||
) -> None:
|
||||
self.stream.__exit__(exc_type, exc_value, traceback)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user