Skip to content

Commit

Permalink
Closes issue 30 : adds full docstring to parse_file
Browse files Browse the repository at this point in the history
  • Loading branch information
shidarin committed Jun 16, 2014
1 parent cd39ac7 commit ea89e9a
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion cdl_convert/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,29 @@ def _remove_xmlns(input_file):


def parse_file(filepath, filetype=None):
"""Determines & uses the correct parser to use on a CDL file"""
"""Determines & uses the correct parser to use on a CDL file
Args:
filepath : (str)
The filepath to the file. Must exist.
filetype=None : (str)
A file extension corresponding to the CDL type to convert from.
If not provided, we'll derive it from the filepath.
Should not include a '.'
Raises:
N/A
Returns:
:class:`ColorCorrection` or :class:`ColorCollection`
Depending on the type of input file, this function will
either return a single :class:`ColorCorrection` or a full
:class:`ColorCollection` , containing one or more
:class:`ColorCorrection` or :class:`ColorDecision`
"""
if not filetype:
filetype = os.path.basename(filepath).split('.')[-1].lower()

Expand Down

0 comments on commit ea89e9a

Please sign in to comment.