mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
from typing import IO, Dict, List, Optional, Sequence, Tuple, Union
|
||||
from _typeshed import StrPath
|
||||
from typing import IO, Dict, List, Optional, Sequence, Tuple
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from os import PathLike
|
||||
def guess_type(url: Union[str, PathLike[str]], strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
def guess_type(url: StrPath, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
else:
|
||||
def guess_type(url: str, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
Reference in New Issue
Block a user