diff --git a/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py b/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py index 674fb04ae0..09b280f207 100644 --- a/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py +++ b/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py @@ -643,7 +643,7 @@ def _get_shape_attr_documentation_string( # exclude resource attributes from documentation continue else: - if documentation == None: + if documentation is None: documentation_string += f"{attribute_snake}: \n" else: documentation_string += f"{attribute_snake}: {documentation}\n" diff --git a/sagemaker-core/src/sagemaker/core/tools/templates.py b/sagemaker-core/src/sagemaker/core/tools/templates.py index 674bd9a956..3a1cc326d1 100644 --- a/sagemaker-core/src/sagemaker/core/tools/templates.py +++ b/sagemaker-core/src/sagemaker/core/tools/templates.py @@ -644,7 +644,7 @@ def populate_chained_attributes(resource_name: str, operation_input_args: Union[ if value == Unassigned() : unassigned_args.append(arg) - elif value == None or not value: + elif value is None or not value: continue elif ( arg_snake.endswith("name")