8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63aba49 commit f8ad6b7Copy full SHA for f8ad6b7
fire/core.py
@@ -57,6 +57,7 @@ def main(argv):
57
import pipes
58
import shlex
59
import sys
60
+import types
61
62
from fire import completion
63
from fire import decorators
@@ -166,13 +167,8 @@ def _PrintResult(component_trace, verbose=False):
166
167
# and move serialization to it's own module.
168
result = component_trace.GetResult()
169
- if isinstance(result, list):
170
- for i in result:
171
- print(_OneLineResult(i))
172
- elif isinstance(result, set):
173
174
175
- elif inspect.isgenerator(result):
+
+ if isinstance(result, (list, set, types.GeneratorType)):
176
for i in result:
177
print(_OneLineResult(i))
178
elif inspect.isgeneratorfunction(result):
0 commit comments