mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
This commit is contained in:
@@ -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