From ca894f202609c8d27ba14ea1f200523e1ba7ba74 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Tue, 11 Nov 2025 12:34:00 -0500 Subject: Other changes related to handling null strings. This fixes the incorrect type hint and the other instance of the function. It also looks like type parsing could have the same issue, so I've updated that as well. --- python/generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/generator.cpp') diff --git a/python/generator.cpp b/python/generator.cpp index a3d252c3..82eed91b 100644 --- a/python/generator.cpp +++ b/python/generator.cpp @@ -313,7 +313,7 @@ int main(int argc, char* argv[]) fprintf(out, " return var\n"); fprintf(out, " return var.encode(\"utf-8\")\n\n\n"); - fprintf(out, "def pyNativeStr(arg: AnyStr) -> str:\n"); + fprintf(out, "def pyNativeStr(arg: Optional[AnyStr]) -> Optional[str]:\n"); fprintf(out, " if arg is None or isinstance(arg, str):\n"); fprintf(out, " return arg\n"); fprintf(out, " else:\n"); -- cgit v1.3.1