Scrapy, a fast high-level web crawling & scraping framework for Python.
Replace isort with the ruff isort rules.
Andrey Rakhmatullincc484efd43b0
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 39b9a33aa..d253f61c6 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -8,10 +8,6 @@ repos:rev: 24.4.2hooks:- id: black-- repo: https://github.com/pycqa/isort- rev: 5.13.2- hooks:- - id: isort- repo: https://github.com/adamchainz/blacken-docsrev: 1.18.0hooks:diff --git a/pyproject.toml b/pyproject.tomlindex 7dc1f6ec3..a2dabcf4b 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -116,9 +116,6 @@ disable_warnings = ["include-ignored"]# https://github.com/nedbat/coveragepy/issues/831#issuecomment-517778185exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]-[tool.isort]-profile = "black"-[tool.pylint.MASTER]persistent = "no"jobs = 1 # >1 hides results@@ -226,6 +223,8 @@ extend-select = ["FA",# refurb"FURB",+ # isort+ "I",# flake8-implicit-str-concat"ISC",# flake8-loggingdiff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.pyindex bd3200e9f..9f65794fe 100644--- a/scrapy/core/downloader/handlers/http11.py+++ b/scrapy/core/downloader/handlers/http11.py@@ -17,9 +17,14 @@ from twisted.internet.endpoints import TCP4ClientEndpointfrom twisted.internet.error import TimeoutErrorfrom twisted.internet.protocol import Factory, Protocol, connectionDonefrom twisted.python.failure import Failure-from twisted.web.client import URI, Agent, HTTPConnectionPool+from twisted.web.client import (+ URI,+ Agent,+ HTTPConnectionPool,+ ResponseDone,+ ResponseFailed,+)from twisted.web.client import Response as TxResponse-from twisted.web.client import ResponseDone, ResponseFailedfrom twisted.web.http import PotentialDataLoss, _DataLossfrom twisted.web.http_headers import Headers as TxHeadersfrom twisted.web.iweb import UNKNOWN_LENGTH, IBodyProducer, IPolicyForHTTPSdiff --git a/scrapy/http/cookies.py b/scrapy/http/cookies.pyindex 56941ad51..60322fe6e 100644--- a/scrapy/http/cookies.py+++ b/scrapy/http/cookies.py@@ -2,9 +2,8 @@ from __future__ import annotationsimport reimport time-from http.cookiejar import Cookie+from http.cookiejar import Cookie, CookiePolicy, DefaultCookiePolicyfrom http.cookiejar import CookieJar as _CookieJar-from http.cookiejar import CookiePolicy, DefaultCookiePolicyfrom typing import TYPE_CHECKING, Any, castfrom scrapy.utils.httpobj import urlparse_cacheddiff --git a/tests/CrawlerRunner/ip_address.py b/tests/CrawlerRunner/ip_address.pyindex 5bf7512bc..2f1bb7713 100644--- a/tests/CrawlerRunner/ip_address.py+++ b/tests/CrawlerRunner/ip_address.py@@ -1,9 +1,8 @@from urllib.parse import urlparsefrom twisted.internet import reactor-from twisted.names import cache+from twisted.names import cache, resolvefrom twisted.names import hosts as hostsModule-from twisted.names import resolvefrom twisted.names.client import Resolverfrom twisted.python.runtime import platform