Skip to content

Commit

Permalink
booleans start in uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Nov 7, 2024
1 parent 87e25f1 commit 3ad8594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private void WriteDirectAccessProperties(CodeClass parentClass, LanguageWriter w
defaultValue = $"{enumDefinition.Name}({defaultValue})";
break;
case CodeType propType when propType.Name.Equals("boolean", StringComparison.OrdinalIgnoreCase):
defaultValue = defaultValue.TrimQuotes();
defaultValue = defaultValue.TrimQuotes().ToFirstCharacterUpperCase();// python booleans start in uppercase
break;
}
conventions.WriteInLineDescription(propWithDefault, writer);
Expand Down Expand Up @@ -424,7 +424,7 @@ private void WriteSetterAccessProperties(CodeClass parentClass, LanguageWriter w
defaultValue = $"{enumDefinition.Name}({defaultValue})";
break;
case CodeType propType when propType.Name.Equals("boolean", StringComparison.OrdinalIgnoreCase):
defaultValue = defaultValue.TrimQuotes();
defaultValue = defaultValue.TrimQuotes().ToFirstCharacterUpperCase();// python booleans start in uppercase
break;
}
var returnType = conventions.GetTypeString(propWithDefault.Type, propWithDefault, true, writer);
Expand Down

0 comments on commit 3ad8594

Please sign in to comment.