falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

Type Annotations for Before Hook #2234

Closed nZac closed 3 months ago

nZac commented 5 months ago

Summary of Changes

Despite the poorly named branch, this PR brings a brings type annotations to the before hook. The approach is a proof of concept and I'll welcome suggestions. I've not typed all the functions beneath it, just the top level API though that should be accomplished at some point. See the commit messages for more details.

Related Issues

The existing type issues are closed already, so N/A for now.

Pull Request Checklist

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (9b27c71) to head (46e542c).

:exclamation: Current head 46e542c differs from pull request most recent head 22844be

Please upload reports for the commit 22844be to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2234 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 63 63 Lines 6931 6896 -35 Branches 1258 1258 ========================================= - Hits 6931 6896 -35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CaselIT commented 3 months ago

this was implemented in https://github.com/falconry/falcon/pull/2183

CaselIT commented 3 months ago

will leave a todo in the code to improve that part