mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-24 09:18:40 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -2,11 +2,11 @@ import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from asyncio.events import AbstractEventLoop
|
||||
from os import stat_result
|
||||
from typing import Any, Sequence, Union, overload
|
||||
from typing import Any, Sequence, overload
|
||||
|
||||
from . import ospath as path
|
||||
|
||||
_FdOrAnyPath = Union[int, StrOrBytesPath]
|
||||
_FdOrAnyPath = int | StrOrBytesPath
|
||||
|
||||
async def stat(
|
||||
path: _FdOrAnyPath, # noqa: F811
|
||||
|
||||
@@ -7,14 +7,14 @@ from _typeshed import (
|
||||
StrOrBytesPath,
|
||||
)
|
||||
from asyncio import AbstractEventLoop
|
||||
from typing import Any, Callable, Union, overload
|
||||
from typing import Any, Callable, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from ..base import AiofilesContextManager
|
||||
from .binary import AsyncBufferedIOBase, AsyncBufferedReader, AsyncFileIO, _UnknownAsyncBinaryIO
|
||||
from .text import AsyncTextIOWrapper
|
||||
|
||||
_OpenFile = Union[StrOrBytesPath, int]
|
||||
_OpenFile = StrOrBytesPath | int
|
||||
_Opener = Callable[[str, int], int]
|
||||
|
||||
# Text mode: always returns AsyncTextIOWrapper
|
||||
|
||||
Reference in New Issue
Block a user