adriangb / xpresso

A composable Python ASGI web framework
https://xpresso-api.dev/
MIT License
177 stars 4 forks source link

refactor!: cleanup Binder APIs & make form field parsing private #71

Closed adriangb closed 2 years ago

adriangb commented 2 years ago

This keeps the ability to parse entire bodies or form fields public, but makes the ability to parse form fields private.

In practice, this just means that user's won't be able to implement their own FormFieldExtractor or FormEncodedField, which they were unlikely to need to do in the first place

codecov-commenter commented 2 years ago

Codecov Report

Merging #71 (9d3e5d4) into main (d53707c) will decrease coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   98.08%   98.05%   -0.03%     
==========================================
  Files         141      139       -2     
  Lines        4537     4431     -106     
  Branches      742      716      -26     
==========================================
- Hits         4450     4345     -105     
  Misses         43       43              
+ Partials       44       43       -1     
Impacted Files Coverage Δ
tests/test_docs/tutorial/test_multipart.py 100.00% <ø> (ø)
...s/test_extractors/body/test_form_data_extractor.py 100.00% <ø> (ø)
...s/test_extractors/body/test_multipart_extractor.py 100.00% <ø> (ø)
tests/test_openapi/body/test_multipart_openapi.py 100.00% <ø> (ø)
xpresso/_utils/asgi_scope_extension.py 100.00% <ø> (ø)
xpresso/_utils/overrides.py 100.00% <ø> (ø)
xpresso/_utils/routing.py 95.65% <ø> (-0.19%) :arrow_down:
.../binders/_body/extractors/body_field_validation.py 81.81% <ø> (ø)
xpresso/binders/_utils/examples.py 100.00% <ø> (ø)
xpresso/binders/_utils/forms.py 100.00% <ø> (ø)
... and 34 more