refactor: lint code

This commit is contained in:
Бакыт Ниязалиев 2025-06-11 22:54:39 +07:00
parent b3fe4b0019
commit 3c7518e90f
28 changed files with 27 additions and 54 deletions

View File

@ -3,9 +3,8 @@ from __future__ import annotations
import typing
from datetime import timedelta
import pytest
import httpx
import pytest
@pytest.mark.anyio

View File

@ -13,9 +13,8 @@ import typing
from urllib.request import parse_keqv_list
import anyio
import pytest
import httpx
import pytest
from ..common import FIXTURES_DIR

View File

@ -4,9 +4,8 @@ import typing
from datetime import timedelta
import chardet
import pytest
import httpx
import pytest
def autodetect(content):

View File

@ -1,8 +1,7 @@
from http.cookiejar import Cookie, CookieJar
import pytest
import httpx
import pytest
def get_and_set_cookies(request: httpx.Request) -> httpx.Response:

View File

@ -1,6 +1,5 @@
import pytest
import httpx
import pytest
def app(request: httpx.Request) -> httpx.Response:

View File

@ -1,8 +1,7 @@
#!/usr/bin/env python3
import pytest
import httpx
import pytest
def echo_headers(request: httpx.Request) -> httpx.Response:

View File

@ -1,7 +1,6 @@
import httpcore
import pytest
import httpx
import pytest
def url_to_origin(url: str) -> httpcore.URL:

View File

@ -1,8 +1,7 @@
import typing
import pytest
import httpx
import pytest
def redirects(request: httpx.Request) -> httpx.Response:

View File

@ -5,6 +5,7 @@ import threading
import time
import typing
import httpx
import pytest
import trustme
from cryptography.hazmat.backends import default_backend
@ -17,7 +18,6 @@ from cryptography.hazmat.primitives.serialization import (
from uvicorn.config import Config
from uvicorn.server import Server
import httpx
from tests.concurrency import sleep
ENVIRONMENT_VARIABLES = {

View File

@ -1,8 +1,7 @@
import http
import pytest
import httpx
import pytest
def test_cookies():

View File

@ -1,6 +1,5 @@
import pytest
import httpx
import pytest
def test_headers():

View File

@ -1,6 +1,5 @@
import pytest
import httpx
import pytest
@pytest.mark.parametrize(

View File

@ -1,9 +1,8 @@
import pickle
import typing
import pytest
import httpx
import pytest
def test_request_repr():

View File

@ -3,9 +3,8 @@ import pickle
import typing
import chardet
import pytest
import httpx
import pytest
class StreamingBody:

View File

@ -1,6 +1,5 @@
import pytest
import httpx
import pytest
# Tests for `httpx.URL` instantiation and property accessors.

View File

@ -5,7 +5,6 @@
import json
import pytest
from httpx._urlparse import urlparse
# URL test cases from...

View File

@ -1,8 +1,7 @@
import typing
import pytest
import httpx
import pytest
def test_get(server):

View File

@ -1,8 +1,7 @@
import json
import pytest
import httpx
import pytest
async def hello_world(scope, receive, send):

View File

@ -6,9 +6,8 @@ Integration tests also exist in tests/client/test_auth.py
from urllib.request import parse_keqv_list
import pytest
import httpx
import pytest
def test_basic_auth():

View File

@ -3,9 +3,8 @@ import typing
from pathlib import Path
import certifi
import pytest
import httpx
import pytest
def test_load_ssl_config():

View File

@ -1,9 +1,8 @@
import io
import typing
import pytest
import httpx
import pytest
method = "POST"
url = "https://www.example.com"

View File

@ -5,11 +5,10 @@ import typing
import zlib
import chardet
import httpx
import pytest
import zstandard as zstd
import httpx
def test_deflate():
"""

View File

@ -3,9 +3,8 @@ from __future__ import annotations
import typing
import httpcore
import pytest
import httpx
import pytest
if typing.TYPE_CHECKING: # pragma: no cover
from conftest import TestServer

View File

@ -1,9 +1,8 @@
import os
import typing
from click.testing import CliRunner
import httpx
from click.testing import CliRunner
def splitlines(output: str) -> typing.Iterable[str]:

View File

@ -4,9 +4,8 @@ import io
import tempfile
import typing
import pytest
import httpx
import pytest
def echo_request_content(request: httpx.Request) -> httpx.Response:

View File

@ -1,6 +1,5 @@
import pytest
import httpx
import pytest
@pytest.mark.anyio

View File

@ -3,9 +3,8 @@ import logging
import os
import random
import pytest
import httpx
import pytest
from httpx._utils import URLPattern, get_environment_proxies

View File

@ -6,9 +6,8 @@ import wsgiref.validate
from functools import partial
from io import StringIO
import pytest
import httpx
import pytest
if typing.TYPE_CHECKING: # pragma: no cover
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment