Skip to content

Commit

Permalink
Create InputOutputInfoGeneratorCustom.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kshan813 committed Sep 25, 2024
1 parent b86e13b commit c51c861
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pash_annotations.annotation_generation.annotation_generators.InputOutputInfoGenerator_Interface import InputOutputInfoGeneratorInterface
from pash_annotations.datatypes.BasicDatatypes import Operand


class InputOutputInfoGeneratorGrep(InputOutputInfoGeneratorInterface):

def generate_info(self) -> None:
#no flags case
self.set_implicit_use_of_stdout()
"""
if self.does_flag_option_list_contain_at_least_one_of(["-e", "-f"]):
if self.get_operand_list_length() == 0:
self.set_implicit_use_of_stdin()
else:
self.all_operands_are_streaming_inputs() # this is true also if empty
"""
#else:
self.set_first_operand_as_config_arg_type_string()
if self.get_operand_list_length() == 1:
self.set_implicit_use_of_stdin()
else:
self.all_but_first_operand_is_streaming_input()

0 comments on commit c51c861

Please sign in to comment.