Skip to content

Clean up URL signature.#3245

Merged
lovelydinosaur merged 2 commits intomasterfrom
cleanup-url-signature
Jul 23, 2024
Merged

Clean up URL signature.#3245
lovelydinosaur merged 2 commits intomasterfrom
cleanup-url-signature

Conversation

@lovelydinosaur
Copy link
Copy Markdown
Contributor

Refs https://github.com/encode/httpx/issues/3176#issuecomment-2068231852

Our public methods currently include a shortcut type URLTypes, which is not public API.
This refactoring removes the shortcut type in favor of explicit typing.

There are also other similar cases, tho one this is an easy refactoring to demonstrate.

@lovelydinosaur lovelydinosaur added the refactor Issues and PRs related to code refactoring label Jul 23, 2024
URLTypes,
VerifyTypes,
)
from ._urls import URL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could it be under typing.TYPE_CHECKING?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd only use that if it was required to avoid a cyclical dependency.

@lovelydinosaur
Copy link
Copy Markdown
Contributor Author

Build failures addressed in #3246

@lovelydinosaur lovelydinosaur merged commit 359f77d into master Jul 23, 2024
@lovelydinosaur lovelydinosaur deleted the cleanup-url-signature branch July 23, 2024 14:46
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues and PRs related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants