original_docstring:  Decide, if a file should be opened or executed and call the appropriate method 
docstring: Decide, if a file should be opened or executed and call the appropriate method
docstring_tokens: Decide if a file should be opened or executed and call the appropriate method
code: def run_file(file_path: Path, is_console_app: bool, args: str):
      """ Decide, if a file should be opened or executed and call the appropriate method """
      if not file_path.is_file():
          return
      try:
          if is_file_executable(file_path):
              execute_app(file_path, is_console_app, args)
          else:
              open_file(file_path)
      except Exception:
          Logger().error(f"Error while executing {str(file_path)} with args: {args}.")
code_tokens: def run_file ( file_path : Path , is_console_app : bool , args : str ) : if not file_path . is_file ( ) : return try : if is_file_executable ( file_path ) : execute_app ( file_path , is_console_app , args ) else : open_file ( file_path ) except Exception : Logger ( ) . error ( f"Error while executing {str(file_path)} with args: {args}." )
short_docstring: Decide, if a file should be opened or executed and call the appropriate method
short_docstring_tokens: Decide if a file should be opened or executed and call the appropriate method
comment: """ Decide, if a file should be opened or executed and call the appropriate method """