Skip to content

Commit

Permalink
Updated None default condition
Browse files Browse the repository at this point in the history
  • Loading branch information
amandayu1 committed Aug 22, 2024
1 parent ead7d3a commit a74e4ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/language/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a74e4ce

Please sign in to comment.