From f65936408e24ede5a4e3c05f624323bfc474c585 Mon Sep 17 00:00:00 2001 From: Nadav Geva Date: Tue, 5 Mar 2024 13:29:54 +0200 Subject: [PATCH] Check for derived types for configuration (#1223) --- dateparser/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dateparser/conf.py b/dateparser/conf.py index 92743a6fa..1548b7c28 100644 --- a/dateparser/conf.py +++ b/dateparser/conf.py @@ -243,7 +243,7 @@ def check_settings(settings): setting_props = settings_values[setting_name] # check type: - if not setting_type == setting_props["type"]: + if not isinstance(setting_value, setting_props["type"]): raise SettingValidationError( '"{}" must be "{}", not "{}".'.format( setting_name, setting_props["type"].__name__, setting_type.__name__