Skip to content

Commit 5d0efb5

Browse files
committed
Cache issubclass call
1 parent 53f2f32 commit 5d0efb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dacite/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def is_subclass(sub_type: Type, base_type: Type) -> bool:
230230
if is_generic_collection(sub_type):
231231
sub_type = extract_origin_collection(sub_type)
232232
try:
233-
return issubclass(sub_type, base_type)
233+
return cache(issubclass)(sub_type, base_type)
234234
except TypeError:
235235
return False
236236

0 commit comments

Comments
 (0)