From aa76b834287a0cf6a7aedb8aacf5e5883acd7b85 Mon Sep 17 00:00:00 2001 From: Luigi311 Date: Fri, 27 Jan 2023 12:21:38 -0700 Subject: [PATCH] Use isinstance instead of type --- src/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions.py b/src/functions.py index 07fd512..500098c 100644 --- a/src/functions.py +++ b/src/functions.py @@ -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"