Skip to content

Commit

Permalink
format (#3131)
Browse files Browse the repository at this point in the history
Co-authored-by: T-256 <Tester@test.com>
  • Loading branch information
T-256 and T-256 committed Mar 1, 2024
1 parent f3eb3c9 commit 0006ed0
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions httpx/_compat.py
Expand Up @@ -2,6 +2,7 @@
The _compat module is used for code which requires branching between different
Python environments. It is excluded from the code coverage checks.
"""

import ssl
import sys

Expand Down
1 change: 1 addition & 0 deletions httpx/_decoders.py
Expand Up @@ -3,6 +3,7 @@
See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
"""

from __future__ import annotations

import codecs
Expand Down
1 change: 1 addition & 0 deletions httpx/_exceptions.py
Expand Up @@ -30,6 +30,7 @@
x ResponseNotRead
x RequestNotRead
"""

from __future__ import annotations

import contextlib
Expand Down
1 change: 1 addition & 0 deletions httpx/_transports/default.py
Expand Up @@ -23,6 +23,7 @@
transport = httpx.HTTPTransport(uds="socket.uds")
client = httpx.Client(transport=transport)
"""

from __future__ import annotations

import contextlib
Expand Down
1 change: 1 addition & 0 deletions httpx/_urlparse.py
Expand Up @@ -15,6 +15,7 @@
validation, but this module provides a simpler alternative, with less indirection
required.
"""

from __future__ import annotations

import ipaddress
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Expand Up @@ -93,12 +93,11 @@ text = "\n---\n\n[Full changelog](https://github.com/encode/httpx/blob/master/CH
pattern = 'src="(docs/img/.*?)"'
replacement = 'src="https://raw.githubusercontent.com/encode/httpx/master/\1"'

# https://beta.ruff.rs/docs/configuration/#using-rufftoml
[tool.ruff]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "PIE"]
ignore = ["B904", "B028"]

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true

[tool.ruff.lint.per-file-ignores]
Expand Down
1 change: 1 addition & 0 deletions tests/client/test_auth.py
Expand Up @@ -3,6 +3,7 @@
Unit tests for auth classes also exist in tests/test_auth.py
"""

import hashlib
import netrc
import os
Expand Down
1 change: 1 addition & 0 deletions tests/test_auth.py
Expand Up @@ -3,6 +3,7 @@
Integration tests also exist in tests/client/test_auth.py
"""

from urllib.request import parse_keqv_list

import pytest
Expand Down
4 changes: 2 additions & 2 deletions tests/test_multipart.py
Expand Up @@ -462,8 +462,8 @@ def test_unicode_escape(self):
assert expected in request.read()

def test_unicode_with_control_character(self):
filename = "hello\x1A\x1B\x1C"
expected = b'filename="hello%1A\x1B%1C"'
filename = "hello\x1a\x1b\x1c"
expected = b'filename="hello%1A\x1b%1C"'
files = {"upload": (filename, b"<file content>")}
request = httpx.Request("GET", "https://www.example.com", files=files)
assert expected in request.read()

0 comments on commit 0006ed0

Please sign in to comment.