mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 20:12:08 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import SupportsLessThanT
|
||||
from typing import List, Sequence, Text, Tuple, Union, overload
|
||||
from typing import Sequence, Text, Union, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
# All overloads can return empty string. Ideally, Literal[""] would be a valid
|
||||
@@ -10,9 +10,9 @@ def commonprefix(m: Sequence[str]) -> str | Literal[""]: ... # type: ignore
|
||||
@overload
|
||||
def commonprefix(m: Sequence[Text]) -> Text: ... # type: ignore
|
||||
@overload
|
||||
def commonprefix(m: Sequence[List[SupportsLessThanT]]) -> Sequence[SupportsLessThanT]: ...
|
||||
def commonprefix(m: Sequence[list[SupportsLessThanT]]) -> Sequence[SupportsLessThanT]: ...
|
||||
@overload
|
||||
def commonprefix(m: Sequence[Tuple[SupportsLessThanT, ...]]) -> Sequence[SupportsLessThanT]: ...
|
||||
def commonprefix(m: Sequence[tuple[SupportsLessThanT, ...]]) -> Sequence[SupportsLessThanT]: ...
|
||||
def exists(path: Text) -> bool: ...
|
||||
def getsize(filename: Text) -> int: ...
|
||||
def isfile(path: Text) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user