Skip to content

Commit

Permalink
Merge pull request #105 from mshriver/fix-travis-flake
Browse files Browse the repository at this point in the history
Fix flake errors with quote escaping and R1720
  • Loading branch information
mshriver authored Jul 30, 2019
2 parents 648ec99 + ec98393 commit ba2bcbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fauxfactory/factories/internet.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def gen_ipaddr(ip3=False, ipv6=False, prefix=()):
raise ValueError(
'Prefix {} would lead to no randomness at all'.format(
repr(prefix)))
elif rng < 0:
if rng < 0:
raise ValueError(
'Prefix {} is too long for this configuration'.format(
repr(prefix)))
Expand Down
4 changes: 2 additions & 2 deletions fauxfactory/factories/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def gen_integer(min_value=None, max_value=None):

# Perform some validations
if not isinstance(min_value, integer_types) or min_value < _min_value:
raise ValueError('\'{0}\' is not a valid minimum.'.format(min_value))
raise ValueError('"{0}" is not a valid minimum.'.format(min_value))
if not isinstance(max_value, integer_types) or max_value > _max_value:
raise ValueError('\'{0}\' is not a valid maximum.'.format(max_value))
raise ValueError('"{0}" is not a valid maximum.'.format(max_value))

random.seed()
value = random.randint(min_value, max_value)
Expand Down
2 changes: 1 addition & 1 deletion fauxfactory/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def is_positive_int(length):
if not isinstance(length, int):
raise ValueError('{0} is not numeric.'.format(length))
if length <= 0:
raise ValueError('{0} is an invalid \'length\'.'.format(length))
raise ValueError('{0} is an invalid length.'.format(length))


def unicode_letters_generator(smp=True):
Expand Down

0 comments on commit ba2bcbd

Please sign in to comment.