Skip to content

Commit

Permalink
Make linter happy: E721 do not compare types.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Aug 23, 2023
1 parent 18a1748 commit 28f834b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OFS/PropertyManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _wrapperCheck(self, object):

def _setPropValue(self, id, value):
self._wrapperCheck(value)
if type(value) == list:
if isinstance(value, list):
value = tuple(value)
setattr(self, id, value)

Expand Down
2 changes: 1 addition & 1 deletion src/OFS/PropertySheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _updateProperty(self, id, value, meta=None):
props.append(prop)
pself._properties = tuple(props)

if type(value) == list:
if isinstance(value, list):
value = tuple(value)
setattr(self.v_self(), id, value)

Expand Down
2 changes: 1 addition & 1 deletion src/ZPublisher/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NoUpdatePropertyManager:
_properties = ()

def _setPropValue(self, id, value):
if type(value) == list:
if isinstance(value, list):
value = tuple(value)
setattr(self, id, value)

Expand Down

0 comments on commit 28f834b

Please sign in to comment.