mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-11-18 21:51:04 +08:00
Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
This commit is contained in:
1 parent
d72b1e8149
commit
e5abd08f93
9 files changed
+30
-28
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import typing
|
||||
from _typeshed import StrPath
|
||||
from datetime import tzinfo
|
||||
from typing import Any, AnyStr, Iterable, Optional, Protocol, Sequence, Set, Type, Union
|
||||
from typing import Any, Iterable, Optional, Protocol, Sequence, Set, Type
|
||||
|
||||
_T = typing.TypeVar("_T", bound="ZoneInfo")
|
||||
|
||||
@@ -23,7 +23,7 @@ class ZoneInfo(tzinfo):
|
||||
# Note: Both here and in clear_cache, the types allow the use of `str` where
|
||||
# a sequence of strings is required. This should be remedied if a solution
|
||||
# to this typing bug is found: https://github.com/python/typing/issues/256
|
||||
def reset_tzpath(to: Optional[Sequence[Union[os.PathLike[AnyStr], str]]] = ...) -> None: ...
|
||||
def reset_tzpath(to: Optional[Sequence[StrPath]] = ...) -> None: ...
|
||||
def available_timezones() -> Set[str]: ...
|
||||
|
||||
TZPATH: Sequence[str]
|
||||
|
||||
Reference in new issue
Block a user