From 57873136b64abc74c5dd0c551739334cb90d26ee Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 14 Nov 2023 15:18:48 -0800 Subject: [PATCH] Use isinstance for type check --- comictaggerlib/ui/talkeruigenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comictaggerlib/ui/talkeruigenerator.py b/comictaggerlib/ui/talkeruigenerator.py index cdda71b..bd8d250 100644 --- a/comictaggerlib/ui/talkeruigenerator.py +++ b/comictaggerlib/ui/talkeruigenerator.py @@ -296,7 +296,7 @@ def get_config_dict(tab: TalkerTab, definitions: settngs.Group) -> dict[str, Any # Warn if type isn't correct guessed_type = definitions.v[dest]._guess_type() - if guessed_type not in (None, "Any") and type(widget_value) is not guessed_type: + if guessed_type not in (None, "Any") and not isinstance(widget_value, guessed_type): # type: ignore[arg-type] logger.warn( "Guessed type is wrong on for '%s': expected: %s got: %s", dest, guessed_type, type(widget_value) )