From ef075f00338e6e6424381b4a6e5755f3cdee698c Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 9 Jan 2025 11:55:50 -0500 Subject: [PATCH] add back check to import Any for msrest models --- .../generator/pygen/codegen/models/model_type.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/http-client-python/generator/pygen/codegen/models/model_type.py b/packages/http-client-python/generator/pygen/codegen/models/model_type.py index f9ede7671d..a95e9c228f 100644 --- a/packages/http-client-python/generator/pygen/codegen/models/model_type.py +++ b/packages/http-client-python/generator/pygen/codegen/models/model_type.py @@ -347,7 +347,8 @@ def instance_check_template(self) -> str: def imports(self, **kwargs: Any) -> FileImport: file_import = super().imports(**kwargs) - file_import.add_submodule_import("typing", "Any", ImportType.STDLIB, TypingSection.CONDITIONAL) + if self.flattened_property: + file_import.add_submodule_import("typing", "Any", ImportType.STDLIB, TypingSection.CONDITIONAL) return file_import