Skip to content

Commit 7f7fa94

Browse files
committed
fix: pylint
1 parent 0f50da5 commit 7f7fa94

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sagemaker/jumpstart/filters.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ def parse_filter_string(filter_string: str) -> ModelFilter:
449449

450450

451451
def _negate_boolean(boolean: BooleanValues) -> BooleanValues:
452+
"""Negates boolean expression (False -> True, True -> False)."""
452453
if boolean == BooleanValues.TRUE:
453454
return BooleanValues.FALSE
454455
if boolean == BooleanValues.FALSE:
@@ -460,6 +461,7 @@ def _evaluate_filter_expression_equals(
460461
model_filter: ModelFilter,
461462
cached_model_value: Optional[Union[str, bool, int, float, Dict[str, Any], List[Any]]],
462463
) -> BooleanValues:
464+
"""Evaluates filter expressions for equals."""
463465
if cached_model_value is None:
464466
return BooleanValues.FALSE
465467
model_filter_value = model_filter.value
@@ -475,6 +477,7 @@ def _evaluate_filter_expression_in(
475477
model_filter: ModelFilter,
476478
cached_model_value: Optional[Union[str, bool, int, float, Dict[str, Any], List[Any]]],
477479
) -> BooleanValues:
480+
"""Evaluates filter expressions for string/list in."""
478481
if cached_model_value is None:
479482
return BooleanValues.FALSE
480483
py_obj = model_filter.value
@@ -484,7 +487,7 @@ def _evaluate_filter_expression_in(
484487
iter(py_obj)
485488
except TypeError:
486489
return BooleanValues.FALSE
487-
except Exception:
490+
except Exception: # pylint: disable=W0703
488491
pass
489492
if isinstance(cached_model_value, list):
490493
return BooleanValues.FALSE
@@ -497,6 +500,7 @@ def _evaluate_filter_expression_includes(
497500
model_filter: ModelFilter,
498501
cached_model_value: Optional[Union[str, bool, int, float, Dict[str, Any], List[Any]]],
499502
) -> BooleanValues:
503+
"""Evaluates filter expressions for string includes."""
500504
if cached_model_value is None:
501505
return BooleanValues.FALSE
502506
filter_value = str(model_filter.value)
@@ -509,6 +513,7 @@ def _evaluate_filter_expression_begins_with(
509513
model_filter: ModelFilter,
510514
cached_model_value: Optional[Union[str, bool, int, float, Dict[str, Any], List[Any]]],
511515
) -> BooleanValues:
516+
"""Evaluates filter expressions for string begins with."""
512517
if cached_model_value is None:
513518
return BooleanValues.FALSE
514519
filter_value = str(model_filter.value)
@@ -521,6 +526,7 @@ def _evaluate_filter_expression_ends_with(
521526
model_filter: ModelFilter,
522527
cached_model_value: Optional[Union[str, bool, int, float, Dict[str, Any], List[Any]]],
523528
) -> BooleanValues:
529+
"""Evaluates filter expressions for string ends with."""
524530
if cached_model_value is None:
525531
return BooleanValues.FALSE
526532
filter_value = str(model_filter.value)

0 commit comments

Comments
 (0)