mirror of https://github.com/scrapy/scrapy.git
Fix the check for sync ITEM_PROCESSOR methods. (#7589)
* Fix the check for sync ITEM_PROCESSOR methods. * Typo.
This commit is contained in:
parent
beb6c51c17
commit
cd25ece58a
|
|
@ -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.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue