Added missing type annotations in various stdlib stubs. (#4402)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2020-08-06 18:27:21 -07:00
committed by GitHub
parent 10a5b070ab
commit baaffed1ac
7 changed files with 43 additions and 42 deletions

View File

@@ -1,7 +1,7 @@
import os
import typing
from datetime import tzinfo
from typing import Any, Iterable, Optional, Protocol, Sequence, Set, Type, Union
from typing import Any, AnyStr, Iterable, Optional, Protocol, Sequence, Set, Type, Union
_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, str]]] = ...) -> None: ...
def reset_tzpath(to: Optional[Sequence[Union[os.PathLike[AnyStr], str]]] = ...) -> None: ...
def available_timezones() -> Set[str]: ...
TZPATH: Sequence[str]