mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
add click.types.DateTime to click stubs (#2958)
This commit is contained in:
committed by
Jelle Zijlstra
parent
548dbbbc71
commit
e67961e387
17
third_party/2and3/click/types.pyi
vendored
17
third_party/2and3/click/types.pyi
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user