From 0af50ad9fd8b4fa5ed1a83cb711ad8a942210d77 Mon Sep 17 00:00:00 2001 From: William Lewis Date: Fri, 19 May 2023 12:35:09 -0700 Subject: [PATCH] chore: fix incorrect comparison operators --- src/stepfunctions/steps/sagemaker.py | 4 ++-- src/stepfunctions/steps/states.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stepfunctions/steps/sagemaker.py b/src/stepfunctions/steps/sagemaker.py index 50c34b1..f8a8382 100644 --- a/src/stepfunctions/steps/sagemaker.py +++ b/src/stepfunctions/steps/sagemaker.py @@ -112,10 +112,10 @@ def __init__(self, state_id, estimator, job_name, data=None, hyperparameters=Non else: training_parameters = training_config(estimator=estimator, inputs=data, mini_batch_size=mini_batch_size) - if estimator.debugger_hook_config != None and estimator.debugger_hook_config is not False: + if estimator.debugger_hook_config is not None and estimator.debugger_hook_config is not False: training_parameters['DebugHookConfig'] = estimator.debugger_hook_config._to_request_dict() - if estimator.rules != None: + if estimator.rules is not None: training_parameters['DebugRuleConfigurations'] = [rule.to_debugger_rule_config_dict() for rule in estimator.rules] if isinstance(job_name, Placeholder): diff --git a/src/stepfunctions/steps/states.py b/src/stepfunctions/steps/states.py index 8396e69..926da79 100644 --- a/src/stepfunctions/steps/states.py +++ b/src/stepfunctions/steps/states.py @@ -224,7 +224,7 @@ def next(self, next_step): # By design, Choice states do not have the Next field. When used in a chain, the subsequent step becomes the # default choice that executes if none of the specified rules match. # See language spec for more info: https://states-language.net/spec.html#choice-state - if self.type is 'Choice': + if self.type == 'Choice': if self.default is not None: logger.warning(f'Chaining Choice state: Overwriting {self.state_id}\'s current default_choice ({self.default.state_id}) with {next_step.state_id}') self.default_choice(next_step)