1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-06 11:00:46 +00:00

Replace isort with the ruff isort rules.

This commit is contained in:
Andrey Rakhmatullin 2024-12-29 14:15:16 +05:00
parent ba33a40365
commit cc484efd43
5 changed files with 11 additions and 13 deletions

View File

@ -8,10 +8,6 @@ repos:
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:

View File

@ -116,9 +116,6 @@ disable_warnings = ["include-ignored"]
# https://github.com/nedbat/coveragepy/issues/831#issuecomment-517778185
exclude_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-logging

View File

@ -17,9 +17,14 @@ from twisted.internet.endpoints import TCP4ClientEndpoint
from twisted.internet.error import TimeoutError
from twisted.internet.protocol import Factory, Protocol, connectionDone
from 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, ResponseFailed
from twisted.web.http import PotentialDataLoss, _DataLoss
from twisted.web.http_headers import Headers as TxHeaders
from twisted.web.iweb import UNKNOWN_LENGTH, IBodyProducer, IPolicyForHTTPS

View File

@ -2,9 +2,8 @@ from __future__ import annotations
import re
import time
from http.cookiejar import Cookie
from http.cookiejar import Cookie, CookiePolicy, DefaultCookiePolicy
from http.cookiejar import CookieJar as _CookieJar
from http.cookiejar import CookiePolicy, DefaultCookiePolicy
from typing import TYPE_CHECKING, Any, cast
from scrapy.utils.httpobj import urlparse_cached

View File

@ -1,9 +1,8 @@
from urllib.parse import urlparse
from twisted.internet import reactor
from twisted.names import cache
from twisted.names import cache, resolve
from twisted.names import hosts as hostsModule
from twisted.names import resolve
from twisted.names.client import Resolver
from twisted.python.runtime import platform