From 8e8417a8396567e7bf9cc3f14ba5383a8c72a6a1 Mon Sep 17 00:00:00 2001 From: nutti Date: Sun, 29 Dec 2024 17:08:54 +0900 Subject: [PATCH] WIP --- src/fake_bpy_module/transformer/data_type_refiner.py | 3 +++ .../expect/special_data_type_transformed.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fake_bpy_module/transformer/data_type_refiner.py b/src/fake_bpy_module/transformer/data_type_refiner.py index bd8e8312..970e2416 100644 --- a/src/fake_bpy_module/transformer/data_type_refiner.py +++ b/src/fake_bpy_module/transformer/data_type_refiner.py @@ -212,6 +212,9 @@ def _get_refined_data_type_fast( # noqa: C901, PLR0911, PLR0912 if dtype_str.startswith("`AnyType`"): return [make_data_type_node("typing.Any")] + if dtype_str == "None": + return [make_data_type_node("None")] + if dtype_str in ("any", "Any", "Any type."): return [make_data_type_node("typing.Any")] diff --git a/tests/python/fake_bpy_module_test/fake_bpy_module_test/transformer_test_data/data_type_refiner_test/expect/special_data_type_transformed.xml b/tests/python/fake_bpy_module_test/fake_bpy_module_test/transformer_test_data/data_type_refiner_test/expect/special_data_type_transformed.xml index 55cdd6a8..f284f87f 100644 --- a/tests/python/fake_bpy_module_test/fake_bpy_module_test/transformer_test_data/data_type_refiner_test/expect/special_data_type_transformed.xml +++ b/tests/python/fake_bpy_module_test/fake_bpy_module_test/transformer_test_data/data_type_refiner_test/expect/special_data_type_transformed.xml @@ -58,7 +58,7 @@ int , - ClassA + module_1.ClassA ], None ]