Robot Framework Integrated Development Environment (RIDE)
robotide.lib.robot.tidy.Tidy Class Reference

Programmatic API for the Tidy tool. More...

Public Member Functions

def __init__ (self, format='txt', use_pipes=False, space_count=4, line_separator=os.linesep)
 
def directory (self, path)
 Tidy a directory. More...
 
def file (self, path, output=None)
 Tidy a file. More...
 
def inplace (self, *paths)
 Tidy file(s) in-place. More...
 

Private Member Functions

def _get_writer (self, inpath, outpath)
 
def _is_directory (self, data)
 
def _is_init_file (self, path)
 
def _is_tsv (self, path)
 
def _parse_data (self, path)
 
def _save_directory (self, data)
 
def _save_file (self, data, output=None)
 

Private Attributes

 _options
 

Detailed Description

Programmatic API for the Tidy tool.

Arguments accepted when creating an instance have same semantics as
Tidy command line options with same names.

Definition at line 140 of file tidy.py.

Constructor & Destructor Documentation

◆ __init__()

def robotide.lib.robot.tidy.Tidy.__init__ (   self,
  format = 'txt',
  use_pipes = False,
  space_count = 4,
  line_separator = os.linesep 
)

Definition at line 142 of file tidy.py.

Member Function Documentation

◆ _get_writer()

def robotide.lib.robot.tidy.Tidy._get_writer (   self,
  inpath,
  outpath 
)
private

Definition at line 164 of file tidy.py.

◆ _is_directory()

def robotide.lib.robot.tidy.Tidy._is_directory (   self,
  data 
)
private

Definition at line 223 of file tidy.py.

◆ _is_init_file()

def robotide.lib.robot.tidy.Tidy._is_init_file (   self,
  path 
)
private

Definition at line 205 of file tidy.py.

◆ _is_tsv()

def robotide.lib.robot.tidy.Tidy._is_tsv (   self,
  path 
)
private

Definition at line 169 of file tidy.py.

◆ _parse_data()

def robotide.lib.robot.tidy.Tidy._parse_data (   self,
  path 
)
private

Definition at line 191 of file tidy.py.

◆ _save_directory()

def robotide.lib.robot.tidy.Tidy._save_directory (   self,
  data 
)
private

Definition at line 214 of file tidy.py.

◆ _save_file()

def robotide.lib.robot.tidy.Tidy._save_file (   self,
  data,
  output = None 
)
private

Definition at line 208 of file tidy.py.

◆ directory()

def robotide.lib.robot.tidy.Tidy.directory (   self,
  path 
)

Tidy a directory.

    :param path: Path of the directory to process.

    All files in a directory, recursively, are processed in-place.

Definition at line 187 of file tidy.py.

◆ file()

def robotide.lib.robot.tidy.Tidy.file (   self,
  path,
  output = None 
)

Tidy a file.

    :param path: Path of the input file.
    :param output: Path of the output file. If not given, output is
        returned.

    Use :func:`inplace` to tidy files in-place.

Definition at line 157 of file tidy.py.

◆ inplace()

def robotide.lib.robot.tidy.Tidy.inplace (   self,
*  paths 
)

Tidy file(s) in-place.

    :param paths: Paths of the files to to process.

Definition at line 177 of file tidy.py.

Member Data Documentation

◆ _options

robotide.lib.robot.tidy.Tidy._options
private

Definition at line 144 of file tidy.py.


The documentation for this class was generated from the following file: