Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions csharp/PythonNetStubGenerator/PythonTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ internal static string SafePythonName(string s)
if (s == "from") return "from_";
if (s == "del") return "del_";
if (s == "None") return "None_";
if (s == "def") return "def_";
return s;
}

Expand Down Expand Up @@ -153,6 +154,7 @@ public static string ToPythonType(this Type t, bool withGenericParams = true)
if (t.IsArray)
{
AddArrayDependency(true);
if (withGenericParams && t.GetElementType() == typeof(byte)) return "bytearray";
return !withGenericParams ? "Array_1" : $"Array_1[{t.GetElementType().ToPythonType()}]";
}

Expand Down