From 6e3f02d3af0c57adc184161ceff065b7a2209074 Mon Sep 17 00:00:00 2001 From: Gates Wang Date: Fri, 24 Apr 2026 14:39:10 -0500 Subject: [PATCH 1/4] Remove unused type: ignore comments and add .vscode to gitignore Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + tests/benchmark/client.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 49e14ccc8..0b199c7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ venv*/ .python-version build/ dist/ +.vscode/ diff --git a/tests/benchmark/client.py b/tests/benchmark/client.py index d07802b01..b5afe7599 100644 --- a/tests/benchmark/client.py +++ b/tests/benchmark/client.py @@ -7,10 +7,10 @@ from typing import Any, Callable, Coroutine, Iterator, List import aiohttp -import matplotlib.pyplot as plt # type: ignore[import-untyped] +import matplotlib.pyplot as plt import pyinstrument import urllib3 -from matplotlib.axes import Axes # type: ignore[import-untyped] +from matplotlib.axes import Axes import httpcore From 23b95c78aa00ad67d15e5361d8a65861b1772f46 Mon Sep 17 00:00:00 2001 From: Gates Wang Date: Fri, 24 Apr 2026 14:40:37 -0500 Subject: [PATCH 2/4] test ci From 8e4e08bbe68107442a433f34007c392e7b3263f4 Mon Sep 17 00:00:00 2001 From: Gates Wang Date: Fri, 24 Apr 2026 14:42:24 -0500 Subject: [PATCH 3/4] Restore type: ignore comments for matplotlib imports Co-Authored-By: Claude Sonnet 4.6 --- tests/benchmark/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmark/client.py b/tests/benchmark/client.py index b5afe7599..d07802b01 100644 --- a/tests/benchmark/client.py +++ b/tests/benchmark/client.py @@ -7,10 +7,10 @@ from typing import Any, Callable, Coroutine, Iterator, List import aiohttp -import matplotlib.pyplot as plt +import matplotlib.pyplot as plt # type: ignore[import-untyped] import pyinstrument import urllib3 -from matplotlib.axes import Axes +from matplotlib.axes import Axes # type: ignore[import-untyped] import httpcore From fabc6743893e5538840cb612be2715bb3573b850 Mon Sep 17 00:00:00 2001 From: Gates Wang Date: Fri, 24 Apr 2026 17:06:39 -0500 Subject: [PATCH 4/4] fixed typos --- CHANGELOG.md | 4 ++-- httpcore/_async/connection_pool.py | 2 +- httpcore/_models.py | 6 +++--- httpcore/_sync/connection_pool.py | 2 +- httpcore/_utils.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5761a3cd0..4a7053d47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## 1.0.5 (March 27th, 2024) - Handle `EndOfStream` exception for anyio backend. (#899) -- Allow trio `0.25.*` series in package dependancies. (#903) +- Allow trio `0.25.*` series in package dependencies. (#903) ## 1.0.4 (February 21st, 2024) @@ -165,7 +165,7 @@ The project versioning policy is now explicitly governed by SEMVER. See https:// ## 0.14.1 (November 12th, 2021) - `max_connections` becomes optional. (Pull #429) -- `certifi` is now included in the install dependancies. (Pull #428) +- `certifi` is now included in the install dependencies. (Pull #428) - `h2` is now strictly optional. (Pull #428) ## 0.14.0 (November 11th, 2021) diff --git a/httpcore/_async/connection_pool.py b/httpcore/_async/connection_pool.py index 5ef74e649..1139f0063 100644 --- a/httpcore/_async/connection_pool.py +++ b/httpcore/_async/connection_pool.py @@ -275,7 +275,7 @@ def _assign_requests_to_connections(self) -> list[AsyncConnectionInterface]: Called whenever a new request is added or removed from the pool. Any closing connections are returned, allowing the I/O for closing - those connections to be handled seperately. + those connections to be handled separately. """ closing_connections = [] diff --git a/httpcore/_models.py b/httpcore/_models.py index 8a65f1334..df3a44c31 100644 --- a/httpcore/_models.py +++ b/httpcore/_models.py @@ -54,7 +54,7 @@ def enforce_headers( value: HeadersAsMapping | HeadersAsSequence | None = None, *, name: str ) -> list[tuple[bytes, bytes]]: """ - Convienence function that ensure all items in request or response headers + Convenience function that ensure all items in request or response headers are either bytes or strings in the plain ASCII range. """ if value is None: @@ -183,13 +183,13 @@ class URL: """ Represents the URL against which an HTTP request may be made. - The URL may either be specified as a plain string, for convienence: + The URL may either be specified as a plain string, for convenience: ```python url = httpcore.URL("https://www.example.com/") ``` - Or be constructed with explicitily pre-parsed components: + Or be constructed with explicitly pre-parsed components: ```python url = httpcore.URL(scheme=b'https', host=b'www.example.com', port=None, target=b'/') diff --git a/httpcore/_sync/connection_pool.py b/httpcore/_sync/connection_pool.py index 4b26f9c63..1b0fd6971 100644 --- a/httpcore/_sync/connection_pool.py +++ b/httpcore/_sync/connection_pool.py @@ -275,7 +275,7 @@ def _assign_requests_to_connections(self) -> list[ConnectionInterface]: Called whenever a new request is added or removed from the pool. Any closing connections are returned, allowing the I/O for closing - those connections to be handled seperately. + those connections to be handled separately. """ closing_connections = [] diff --git a/httpcore/_utils.py b/httpcore/_utils.py index c44ff93cb..ac64422b6 100644 --- a/httpcore/_utils.py +++ b/httpcore/_utils.py @@ -7,7 +7,7 @@ def is_socket_readable(sock: socket.socket | None) -> bool: """ - Return whether a socket, as identifed by its file descriptor, is readable. + Return whether a socket, as identified by its file descriptor, is readable. "A socket is readable" means that the read buffer isn't empty, i.e. that calling .recv() on it would immediately return some data. """