Address issues reported by static checkers

This commit is contained in:
Adrián Chaves 2025-03-13 15:51:28 +01:00
parent 36bf3a8cb4
commit 05a21285f4
3 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -120,7 +120,7 @@ class TestCloseSpider(TestCase):
async def yield_seeds(self):
raise CloseSpider("foo")
yield
yield # pylint: disable=unreachable
close_reasons = []