add click.types.DateTime to click stubs (#2958)

This commit is contained in:
Dan Crosta
2019-05-06 11:36:49 -04:00
committed by Jelle Zijlstra
parent 548dbbbc71
commit e67961e387

View File

@@ -1,4 +1,5 @@
from typing import Any, Callable, IO, Iterable, List, Optional, TypeVar, Union, Tuple as _PyTuple, Type
import datetime
import uuid
from click.core import Context, Parameter, _ParamType as ParamType, _ConvertibleType
@@ -35,6 +36,22 @@ class Choice(ParamType):
...
class DateTime(ParamType):
def __init__(
self,
formats: Optional[List[str]] = ...,
) -> None:
...
def convert(
self,
value: str,
param: Optional[Parameter],
ctx: Optional[Context],
) -> datetime.datetime:
...
class FloatParamType(ParamType):
def __call__(
self,