mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
from _typeshed import BytesPath, StrOrBytesPath, StrPath, SupportsRichComparisonT
|
||||
from typing import Sequence, Tuple, overload
|
||||
from typing import Sequence, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
# All overloads can return empty string. Ideally, Literal[""] would be a valid
|
||||
@@ -13,7 +13,7 @@ def commonprefix(m: Sequence[BytesPath]) -> bytes | Literal[""]: ...
|
||||
@overload
|
||||
def commonprefix(m: Sequence[list[SupportsRichComparisonT]]) -> Sequence[SupportsRichComparisonT]: ...
|
||||
@overload
|
||||
def commonprefix(m: Sequence[Tuple[SupportsRichComparisonT, ...]]) -> Sequence[SupportsRichComparisonT]: ...
|
||||
def commonprefix(m: Sequence[tuple[SupportsRichComparisonT, ...]]) -> Sequence[SupportsRichComparisonT]: ...
|
||||
def exists(path: StrOrBytesPath | int) -> bool: ...
|
||||
def getsize(filename: StrOrBytesPath | int) -> int: ...
|
||||
def isfile(path: StrOrBytesPath | int) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user