Skip to content

Commit

Permalink
add check for None
Browse files Browse the repository at this point in the history
  • Loading branch information
shemogumbe committed Nov 6, 2024
1 parent 09b385d commit 270e62d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ private string GetSerializationMethodName(CodeTypeBase propType)
internal string GetTypeFactory(bool isVoid, bool isStream, bool isEnum, string returnType)
{
if (isVoid) return string.Empty;
if (returnType == "None") return " None,";
if (isStream || isEnum) return $" \"{returnType}\",";
if (conventions.IsPrimitiveType(returnType)) return $" {returnType},";
return $" {returnType},";
Expand Down

0 comments on commit 270e62d

Please sign in to comment.