mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 09:33:25 +08:00
Fix some issues for dateutil and argparse (#357)
* Fix stubs for 2.7/dateutil. They were pretty broken. (The 3/dateutil share some of the brokenness but that's still a TODO.) * Fix argparse stubs. - Container is not strong enough for choices. - add_subparsers() returns something with an add_parser() method.
This commit is contained in:
committed by
David Fisher
parent
63cbe2dc3c
commit
b63e09c239
14
third_party/2.7/dateutil/parser.pyi
vendored
14
third_party/2.7/dateutil/parser.pyi
vendored
@@ -27,13 +27,13 @@ class parserinfo(object):
|
||||
def validate(self, res: datetime) -> bool: ...
|
||||
|
||||
class parser(object):
|
||||
def __init__(self, info: Optional['parserinfo']) -> None: ...
|
||||
def __init__(self, info: parserinfo = None) -> None: ...
|
||||
def parse(self, timestr: Union[str, unicode, IO[unicode]],
|
||||
default: Optional[datetime],
|
||||
ignoretz: bool, tzinfos: Dict[Union[str, unicode], tzinfo],
|
||||
**kwargs: Dict[str, Any]) -> datetime: ...
|
||||
default: datetime = None,
|
||||
ignoretz: bool = ..., tzinfos: Dict[Union[str, unicode], tzinfo] = None,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER = ... # type: 'parser'
|
||||
DEFAULTPARSER = ... # type: parser
|
||||
def parse(timestr: Union[str, unicode, IO[unicode]],
|
||||
parserinfo: Optional['parserinfo'],
|
||||
**kwargs: Dict[str, Any]) -> datetime: ...
|
||||
parserinfo: parserinfo = None,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
Reference in New Issue
Block a user