Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rmax committed Jul 6, 2024
1 parent 8128530 commit 8412be9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/scrapy_redis/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 8412be9

Please sign in to comment.