Skip to content

Commit

Permalink
Docstring tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Jan 16, 2017
1 parent 4053be0 commit 2cd4c27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inselect/lib/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def _assemble_dms(degrees, minutes, seconds, direction, is_latitude):


def parse_matches_regex(regex, value, error_message='Unmatched value [{0}]'):
"""Raises ValueError(error_message) if value does not match regex.
"""Raises ValueError(error_message.format(value)) if value does not match
regex.
"""
res = regex.match(value)
if not res:
Expand All @@ -282,7 +283,7 @@ def parse_matches_regex(regex, value, error_message='Unmatched value [{0}]'):


def parse_in_choices(choices, value):
"""Raise ValueError(error_message) if value is not in choices
"""Raise ValueError if value is not in choices
"""
if value not in choices:
raise ValueError('Invalid value [{0}]: not in choices'.format(value))
Expand Down

0 comments on commit 2cd4c27

Please sign in to comment.