From a74e4cea8d48806a33ea9224ee959ffa2f7c2470 Mon Sep 17 00:00:00 2001 From: Amanda Yu Date: Thu, 22 Aug 2024 15:54:59 -0400 Subject: [PATCH] Updated None default condition --- core/src/language/python.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/language/python.rs b/core/src/language/python.rs index 9f8f6a1c..a5db9601 100644 --- a/core/src/language/python.rs +++ b/core/src/language/python.rs @@ -670,7 +670,7 @@ impl Python { default = Some("None".to_string()) } let python_field_name = python_property_aware_rename(&field.id.original); - python_type = match python_field_name == field.id.renamed { + python_type = match python_field_name == field.id.renamed && field.ty.is_optional() || field.has_default{ true => python_type, false => { self.module