Use isinstance instead of type

This commit is contained in:
Luigi311
2023-01-27 12:21:38 -07:00
parent a644189ea5
commit aa76b83428

View File

@@ -168,7 +168,7 @@ def check_skip_logic(
):
skip_reason = None
if type(library_type) in [list, tuple, set]:
if isinstance(library_type, (list, tuple, set)):
for library_type_item in library_type:
if library_type_item.lower() in blacklist_library_type:
skip_reason = "is blacklist_library_type"
@@ -187,7 +187,7 @@ def check_skip_logic(
skip_reason = "is blacklist_library"
if len(whitelist_library_type) > 0:
if type(library_type) in [list, tuple, set]:
if isinstance(library_type, (list, tuple, set)):
for library_type_item in library_type:
if library_type_item.lower() not in whitelist_library_type:
skip_reason = "is not whitelist_library_type"