-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: typing of datastructures.URL (#2723)
This PR fixes an issue where mypy would infer the type of `datastructures.URL` to be `Any`. This was caused by the use of the `@lrucache` decorator on `URL.__new__()`. We had ignored the error, however mypy would report: > litestar/datastructures/url.py:85: error: Unsupported decorated constructor type [misc] The fix adds a new `@classmethod`, `URL._new()` which is cached and called from `URL.__new__()`.
- Loading branch information
1 parent
9b33f1d
commit a2e5b78
Showing
1 changed file
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters