Skip to content

Commit

Permalink
Convert to tuple out of the function body
Browse files Browse the repository at this point in the history
  • Loading branch information
elacuesta committed Mar 21, 2022
1 parent daa7929 commit 2c2ec56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sh_scrapy/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
_base_item_cls = [dict, scrapy.item.Item]
with suppress(AttributeError):
_base_item_cls.append(scrapy.item.BaseItem)
_base_item_cls = tuple(_base_item_cls)

def is_item(item):
return isinstance(item, tuple(_base_item_cls))
return isinstance(item, _base_item_cls)
else:
def is_item(item):
return ItemAdapter.is_item(item)
Expand Down

0 comments on commit 2c2ec56

Please sign in to comment.