Skip to content

Commit 1c05e34

Browse files
committed
Merge pull request #1 from nsoranzo/for_greg
Simplify strict_min strict_max logic.
2 parents aa2a7c9 + db5c81a commit 1c05e34

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/galaxy/tools/parameters/validation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,9 @@ def __init__( self, message, range_min, range_max, strict_min=False, strict_max=
146146
self_max_str = str( self.max ).rstrip( '0' ).rstrip( '.' )
147147
op1 = '>='
148148
op2 = '<='
149-
if self.strict_min and self.strict_max:
150-
op1 = '>'
151-
op2 = '<'
152149
if self.strict_min:
153150
op1 = '>'
154-
elif self.strict_max:
151+
if self.strict_max:
155152
op2 = '<'
156153
self.message = message or "Value must be %s %s and %s %s" % ( op1, self_min_str, op2, self_max_str )
157154

0 commit comments

Comments
 (0)