Skip to content

Commit

Permalink
dont use isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshg999 committed Sep 17, 2024
1 parent 473eae8 commit 480c80f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktop/core/src/desktop/lib/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def __init__(self, key=_ANONYMOUS, default=None, dynamic_default=None, required=
if (isinstance(default, numbers.Number) or pytype(default) is bool) and not isinstance(type(default), pytype(default)):
raise ValueError("%s: '%s' does not match that of the default value %r (%s)" % (key, type, default, pytype(default)))

if isinstance(type, bool):
if type is bool:
LOG.warning("%s is of type bool. Resetting it as type 'coerce_bool'." " Please fix it permanently" % (key,))
type = coerce_bool

Expand Down Expand Up @@ -646,7 +646,7 @@ def coerce_bool(value):


def coerce_string(value):
if isinstance(value, list):
if type(value) is list:
return ','.join(value)
else:
return value
Expand Down

0 comments on commit 480c80f

Please sign in to comment.