From b02a0a0c354be20bed357d121f2d08e442fb3c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Tue, 9 Jul 2024 12:11:02 +0200 Subject: [PATCH] Keep mypy happy --- scrapy/core/downloader/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scrapy/core/downloader/__init__.py b/scrapy/core/downloader/__init__.py index 8db71c3fb..eac68e071 100644 --- a/scrapy/core/downloader/__init__.py +++ b/scrapy/core/downloader/__init__.py @@ -137,6 +137,7 @@ class Downloader: deprecated_setting_priority = self.settings.getpriority( "SCRAPER_SLOT_MAX_ACTIVE_SIZE" ) + assert deprecated_setting_priority is not None if deprecated_setting_priority > 0: warn( ( @@ -146,6 +147,7 @@ class Downloader: ScrapyDeprecationWarning, ) setting_priority = self.settings.getpriority("RESPONSE_MAX_ACTIVE_SIZE") + assert setting_priority is not None if setting_priority >= deprecated_setting_priority: self._response_max_active_size = self.settings.getint( "RESPONSE_MAX_ACTIVE_SIZE"