mirror of https://github.com/scrapy/scrapy.git
Address issues reported by static checkers
This commit is contained in:
parent
36bf3a8cb4
commit
05a21285f4
|
|
@ -3,7 +3,6 @@
|
|||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# pylint: disable=import-error
|
||||
import os
|
||||
import sys
|
||||
from collections.abc import Sequence
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ class ExecutionEngine:
|
|||
self._slot.nextcall.schedule()
|
||||
return
|
||||
except CloseSpider as exception:
|
||||
assert self.spider is not None # typing
|
||||
self.close_spider(self.spider, reason=exception.reason)
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class TestCloseSpider(TestCase):
|
|||
|
||||
async def yield_seeds(self):
|
||||
raise CloseSpider("foo")
|
||||
yield
|
||||
yield # pylint: disable=unreachable
|
||||
|
||||
close_reasons = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue