Allow fewer arguments than the max in ArgumentSpec (#17826)
authorDavid Riazati <davidriazati@fb.com>
Thu, 14 Mar 2019 23:45:31 +0000 (16:45 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 Mar 2019 23:54:44 +0000 (16:54 -0700)
commite782f200f7a525af4d10ff79d066613d46e23356
treee703a592c9fd8103fbd02cab62f8c43b5b21659d
parent9de4350b77cd7f257c1c60d325f267d50965531e
Allow fewer arguments than the max in ArgumentSpec (#17826)

Summary:
Fixes #17558

The flattened tuple `Optional[Tuple[int, int]]` could either result in 1 (`None`) or 2 (`int` and `int`) values, so allow this case in `ArgumentSpec`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17826

Differential Revision: D14415290

Pulled By: driazati

fbshipit-source-id: 971bfa39502cfb8f08a991f16ffed6d138e48dc9
test/test_jit.py
torch/csrc/jit/argument_spec.h