Skip to content

Commit 36bbf8a

Browse files
authored
change: enable chained-comparison Pylint check (#940)
1 parent 39adbbc commit 36bbf8a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.pylintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ disable=
9090
cyclic-import, # TODO: Resolve cyclic imports
9191
no-self-use, # TODO: Convert methods to functions where appropriate
9292
consider-using-ternary, # TODO: Consider ternary expressions
93-
chained-comparison, # TODO: Simplify chained comparison between operands
9493
too-many-branches, # TODO: Simplify or ignore as appropriate
9594
missing-docstring, # TODO: Fix missing docstring
9695

src/sagemaker/parameter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def is_valid(self, value):
4747
Returns:
4848
bool: True if valid, False otherwise.
4949
"""
50-
return value >= self.min_value and value <= self.max_value
50+
return self.min_value <= value <= self.max_value
5151

5252
@classmethod
5353
def cast_to_type(cls, value):

0 commit comments

Comments
 (0)