Fix the check for sync ITEM_PROCESSOR methods. (#7589)

* Fix the check for sync ITEM_PROCESSOR methods.

* Typo.
This commit is contained in:
Andrey Rakhmatullin 2026-06-11 00:22:30 +05:00 committed by GitHub
parent beb6c51c17
commit cd25ece58a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class Scraper:
def _check_deprecated_itemproc_method(self, method: str) -> None:
itemproc_cls = type(self.itemproc)
if not hasattr(self.itemproc, "process_item_async"):
if not hasattr(self.itemproc, f"{method}_async"):
warnings.warn(
f"{global_object_name(itemproc_cls)} doesn't define a {method}_async() method,"
f" this is deprecated and the method will be required in future Scrapy versions.",