Skip to content
Myr

Enable no_implicit_reexport (#2475)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- Add explicit exports for names imported from `_compat` - Correct imports of `URL` (from `._urls`, not via `._models`) - Correct import of the uvicorn `Server` class

authored by Martijn Pieters · committed by GitHub · parent 2d37321 · Browse files · 5 files+9 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

5 files+9 added−4 removed

  • tests:+1 added−1 removed
  • other:+8 added−3 removed

5 files+9 added−4 removed

modified:httpx/_compat.py+3 added
36 unmodified lines
37 context.options |= ssl.OP_NO_SSLv238 context.options |= ssl.OP_NO_SSLv339 context.options |= ssl.OP_NO_TLSv140 context.options |= ssl.OP_NO_TLSv1_1414243__all__ = ["brotli", "set_minimum_tls_version_1_2"]
modified:httpx/_config.py+2 added-1 removed
5 unmodified lines
67import certifi89from ._compat import set_minimum_tls_version_1_210from ._models import URL, Headers10from ._models import Headers11from ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes12from ._urls import URL13from ._utils import get_ca_bundle_from_env, get_logger1415DEFAULT_CIPHERS = ":".join(16 [
350 unmodified lines
modified:httpx/_utils.py+2 added-2 removed
14 unmodified lines
1516from ._types import PrimitiveData1718if typing.TYPE_CHECKING: # pragma: no cover19 from ._models import URL19 from ._urls import URL202122_HTML5_FORM_ENCODING_REPLACEMENTS = {'"': "%22", "\\": "\\\\"}23_HTML5_FORM_ENCODING_REPLACEMENTS.update(
440 unmodified lines
464 False465 """466467 def __init__(self, pattern: str) -> None:468 from ._models import URL468 from ._urls import URL469470 if pattern and ":" not in pattern:471 raise ValueError(472 f"Proxy keys should use proper URL forms rather "
59 unmodified lines
modified:tests/conftest.py+1 added-1 removed
13 unmodified lines
14 PrivateFormat,15 load_pem_private_key,16)17from uvicorn.config import Config18from uvicorn.main import Server18from uvicorn.server import Server1920from httpx import URL21from tests.concurrency import sleep22
301 unmodified lines
modified:setup.cfg+1 added
14 unmodified lines
15disallow_untyped_decorators = True16warn_redundant_casts = True17strict_concatenate = True18disallow_incomplete_defs = True19no_implicit_reexport = True20warn_return_any = True2122[mypy-tests.*]23disallow_untyped_defs = False
18 unmodified lines