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.
has_dict_attribute
__dict__
1 parent 6fdead7 commit d26a68bCopy full SHA for d26a68b
1 file changed
advanced_alchemy/service/typing.py
@@ -261,7 +261,7 @@ def has_dict_attribute(obj: Any) -> "TypeGuard[DictProtocol]":
261
bool
262
"""
263
# Protocol checking returns True for None, so add explicit check
264
- return obj is not None and isinstance(obj, DictProtocol)
+ return obj is not None and hasattr(obj, "__dict__")
265
266
267
def is_row_mapping(v: Any) -> TypeGuard["RowMapping"]:
0 commit comments