- Are you reporting a bug, or opening a feature request? feature request
- Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
O = TypeVar('O')
def decorator(method : Callable[[O, VarArg(), KwArg()], Any]) -> Callable[[VarArg(), O, KwArg()], Any]:
def x(*args, **kwargs):
return method(args[-1], *args[0:-1], **kwargs)
return x
- What is the actual behavior/output?
Required positional args may not appear after default, named or var args
- What is the behavior/output you expect?
VarArg() or ... to represent the positional args before O
- What are the versions of mypy and Python you are using? 0.600, Python 3.6.2
Do you see the same issue after installing mypy from Git master? Git is the same as release
- What are the mypy flags you are using? (For example --strict-optional): No flags
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
Required positional args may not appear after default, named or var args
VarArg()or...to represent the positional args beforeODo you see the same issue after installing mypy from Git master? Git is the same as release