-
Notifications
You must be signed in to change notification settings - Fork 52
Update Route.respond json type hint to Any to match HTTPX #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #284 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 2915 2915
Branches 192 192
=========================================
Hits 2915 2915 ☔ View full report in Codecov by Sentry. |
|
@JacobHayes, new discussions regarding this has come up in #290 and we're leaning towards typing json as |
4a3a22c to
26e41e2
Compare
|
Yup, that should make pyright happy too! Just updated this PR to use |
26e41e2 to
50e07ef
Compare
Signed-off-by: Jacob Hayes <[email protected]>
50e07ef to
7ec8ab7
Compare
|
Just a ping. Hoping this can get in so Pyright will get off my back. :P |
Co-authored-by: Mike Nerone <[email protected]>
|
FYI @lundberg I'm guessing the |
The
jsonparameter toRoute.respondis missing hints for theListandDictelements, which makespyrightsad in strict mode:This PR just adds the hints for the elements. I think python's
json.dumpwill accept arbitrary key types, but the JSON spec only defines strings so I usedDict[str, ...]. I'm happy to change that toAnyif you'd prefer.Thanks for the helpful library!