Skip to content

Commit

Permalink
fixed typing and orderdict import
Browse files Browse the repository at this point in the history
Summary: ^

Reviewed By: manuelcandales

Differential Revision: D59492834

fbshipit-source-id: bd53ee32989984d9c20f17f62cfd52429e38a375
  • Loading branch information
zonglinpeng authored and facebook-github-bot committed Jul 8, 2024
1 parent 7c5c7c7 commit a88dd7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inputgen/argtuple/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from typing import Any, List, OrderedDict, Tuple
from collections import OrderedDict
from typing import Any, Generator, List, Tuple

from inputgen.argtuple.engine import MetaArgTupleEngine
from inputgen.argument.engine import MetaArg
Expand Down Expand Up @@ -38,7 +39,9 @@ def gen_tuple(

def gen(
self, *, valid: bool = True, out: bool = False
) -> Tuple[List[Any], OrderedDict[str, Any]]:
) -> Generator[
Tuple[List[Any], OrderedDict[str, Any], OrderedDict[str, Any]], Any, Any
]:
engine = MetaArgTupleEngine(self.spec, out=out)
for meta_tuple in engine.gen(valid=valid):
yield self.gen_tuple(meta_tuple, out=out)

0 comments on commit a88dd7e

Please sign in to comment.