From 8412be94d8713ceac0b11379f3aae1b32a4390f6 Mon Sep 17 00:00:00 2001 From: R Max Espinoza Date: Sat, 6 Jul 2024 21:39:13 +0200 Subject: [PATCH] fix: linting --- src/scrapy_redis/scheduler.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scrapy_redis/scheduler.py b/src/scrapy_redis/scheduler.py index 23d94f8a..ba50a101 100644 --- a/src/scrapy_redis/scheduler.py +++ b/src/scrapy_redis/scheduler.py @@ -37,6 +37,7 @@ def __init__( flush_on_start=False, queue_key=defaults.SCHEDULER_QUEUE_KEY, queue_cls=defaults.SCHEDULER_QUEUE_CLASS, + dupefilter=None, dupefilter_key=defaults.SCHEDULER_DUPEFILTER_KEY, dupefilter_cls=defaults.SCHEDULER_DUPEFILTER_CLASS, idle_before_close=0, @@ -56,6 +57,8 @@ def __init__( Requests queue key. queue_cls : str Importable path to the queue class. + dupefilter: Dupefilter + Custom dupefilter instance. dupefilter_key : str Duplicates filter key. dupefilter_cls : str @@ -106,9 +109,9 @@ def from_settings(cls, settings): if val: kwargs[name] = val - dupefilter_cls = load_object(kwargs['dupefilter_cls']) - if not hasattr(dupefilter_cls, 'from_spider'): - kwargs['dupefilter'] = dupefilter_cls.from_settings(settings) + dupefilter_cls = load_object(kwargs["dupefilter_cls"]) + if not hasattr(dupefilter_cls, "from_spider"): + kwargs["dupefilter"] = dupefilter_cls.from_settings(settings) # Support serializer as a path to a module. if isinstance(kwargs.get("serializer"), str):