parameters: ()
return_statement: return (search_directory, search_pattern, result_format, output_file)
docstring: Parses arguments given to script and returns a tuple of processed arguments.
docstring_summary: Parses arguments given to script and returns a tuple of processed arguments.
docstring_tokens: Parses arguments given to script and returns a tuple of processed arguments .
function: def parse_arguments():
      """ Parses arguments given to script and returns a tuple of processed arguments. """
      parser = create_arg_parser()
      args = parser.parse_args()
  
      if args.dir:
          search_directory = [Path(path) for path in args.dir.split(";")]
      else:
          search_directory = [Path.cwd()]
  
      if args.recursive:
          search_pattern = "**/*.yaml"
      else:
          search_pattern = "*.yaml"
  
      if args.log:
          result_format = "log"
      else:
          result_format = "summary"
  
      if args.output:
          if isdir(args.output):
              output_file = Path(args.output).joinpath("summary.yaml")
          elif isdir(Path(args.output).resolve().parent):
              output_file = Path(args.output)
      else:
          output_file = None
  
      return (search_directory, search_pattern, result_format, output_file)
function_tokens: def parse_arguments ( ) : parser = create_arg_parser ( ) args = parser . parse_args ( ) if args . dir : search_directory = [ Path ( path ) for path in args . dir . split ( ";" ) ] else : search_directory = [ Path . cwd ( ) ] if args . recursive : search_pattern = "**/*.yaml" else : search_pattern = "*.yaml" if args . log : result_format = "log" else : result_format = "summary" if args . output : if isdir ( args . output ) : output_file = Path ( args . output ) . joinpath ( "summary.yaml" ) elif isdir ( Path ( args . output ) . resolve ( ) . parent ) : output_file = Path ( args . output ) else : output_file = None return ( search_directory , search_pattern , result_format , output_file )