Skip to content

Commit

Permalink
use ItemAdapter.is_item instead of is_item
Browse files Browse the repository at this point in the history
  • Loading branch information
elacuesta committed Aug 18, 2021
1 parent 4c0a2bf commit 383a89d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions itemadapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
_is_pydantic_model,
is_attrs_instance,
is_dataclass_instance,
is_item,
is_pydantic_instance,
is_scrapy_item,
)
Expand Down Expand Up @@ -336,7 +335,7 @@ def _asdict(obj: Any) -> Any:
return obj.__class__(_asdict(x) for x in obj)
elif isinstance(obj, ItemAdapter):
return obj.asdict()
elif is_item(obj):
elif ItemAdapter.is_item(obj):
return ItemAdapter(obj).asdict()
else:
return obj

0 comments on commit 383a89d

Please sign in to comment.