We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 961e19a commit 74daca7Copy full SHA for 74daca7
src/sqlacodegen/generators.py
@@ -1249,7 +1249,11 @@ def render_python_type(column_type: TypeEngine[Any]) -> str:
1249
self.add_literal_import("typing", "Any")
1250
python_type = Any
1251
1252
- python_type_name = python_type.__name__
+ python_type_name = (
1253
+ python_type.__name__
1254
+ if hasattr(python_type, "__name__")
1255
+ else python_type._name
1256
+ )
1257
python_type_module = python_type.__module__
1258
if python_type_module == "builtins":
1259
return python_type_name
0 commit comments