From 461498e1f894ba92f6ef1a5b034bf75e00961711 Mon Sep 17 00:00:00 2001 From: harshadkhetpal Date: Fri, 20 Mar 2026 00:25:18 +0530 Subject: [PATCH 1/2] fix: use `is None` instead of `== None` (PEP 8 E711) --- sagemaker-core/src/sagemaker/core/tools/resources_codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 6558738adb186fa8d5df020be97ad955c4b82448 Mon Sep 17 00:00:00 2001 From: harshadkhetpal Date: Fri, 20 Mar 2026 00:25:32 +0530 Subject: [PATCH 2/2] fix: use `is None` instead of `== None` in templates.py (PEP 8 E711) --- sagemaker-core/src/sagemaker/core/tools/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")