Skip to content

Commit 7af7784

Browse files
author
Sylvain MARIE
committed
Fixed python 2 compatibility
1 parent 617313b commit 7af7784

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyfields/helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ def get_field_values(obj,
187187
return container_type((f.name, getattr(obj, f.name)) for f in fields_gen)
188188

189189

190-
def safe_isclass(obj: object) -> bool:
190+
def safe_isclass(obj # type: object
191+
):
192+
# type: (...) -> bool
191193
"""Ignore any exception via isinstance on Python 3."""
192194
try:
193195
return isclass(obj)

0 commit comments

Comments
 (0)