Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arg() etc to mypy_extensions #684

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion third_party/2and3/mypy_extensions.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
from typing import Dict, Type, TypeVar
from typing import Dict, Type, TypeVar, Optional, Any

T = TypeVar('T')


def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...

class Arg(object):
def __init__(name: Optional[str]=...,
typ: Type[T]=...,
keyword_only: Optional[bool]=...) -> None:
...

class DefaultArg(object):
def __init__(name: Optional[str]=...,
typ: Type[T]=...,
keyword_only: Optional[bool]=...) -> None:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops these actually shouldn't be optional. What I get for reviewing my own code.

...

class StarArg(object):
def __init__(typ: Type[T]=...) -> None: ...

class KwArg(object):
def __init__(typ: Type[T]=...) -> None: ...