We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcab904 commit 80f8932Copy full SHA for 80f8932
sqlmypy.py
@@ -200,7 +200,9 @@ def decl_info_hook(ctx: DynamicClassDefContext) -> None:
200
201
info = TypeInfo(SymbolTable(), class_def, ctx.api.cur_mod_id)
202
class_def.info = info
203
- obj = ctx.api.builtin_type('builtins.object')
+ # use builtin_type if it exists, otherwise named_type
204
+ # mypy .930 deprecated builtin_type, but it was added back in in .931
205
+ obj = ctx.api.builtin_type('builtins.object') if hasattr(ctx.api, "builtin_type") else ctx.api.named_type('builtins.object')
206
info.bases = cls_bases or [obj]
207
try:
208
calculate_mro(info)
0 commit comments