Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: type more falcon modules (#2171)
* feat: Type app helpers module * feat: Add typing to errors module * feat: Add typings to forwarded module * feat: Add typing to hooks * feat: Add typing to falcon hooks * feat: Add typing to http_error module * feat: Extract RawHeaders and NormalizedHeaders to typing module * feat: Extract status to typing module * feat: Add typing to http_status module * feat: Add typing to inspect module * feat: Add typing to middleware module * feat: Replace protocol with interface * feat: Add typing to redirects * feat: Type vendor mimeparse * Changed RawHeaders to not include None * Reformated imports * Test that interface raises not implemented * Type algorithm int values as float * Changed allowed methods to Iterable * Imported annotations in hooks * Change argnames type to list of strings * Changed Dict to mutable mapping * Fixed formatting * Remove unused imports * Fix typing * Replaced assert with cast * Fix blue * Type resource as object * Fix style * Revert "Type algorithm int values as float" This reverts commit ca1df71. * Revert "feat: Type vendor mimeparse" This reverts commit 11ca7ca. * Ignore vendore package * Use async package instead of importing AsyncRequest and AsyncResponse and aliasing them * Solve circular imports while typing * Fix style * Changed inspect obj type to Any * Import annotations where missing * Replace Union with | where future annotations imported * Revert "Replace Union with | where future annotations imported" This reverts commit fd8b3be. * Improve imports to avoid them inside functions * Fix typo * Rename Kwargs to HTTPErrorKeywordArgs * Import whole package insted of specific types * Fix style * Replace Serializer and MediaHandler with protocol * Add assertion reason message * Fix import issue * Fix import order * Fix coverage issues * Add ResponderOrResource and Action types * style: run ruff * typing: apply review feedmack * typing: avoid protocols for handlers * typing: improve type alias name * fix: restore support to python 3.8 and 3.7 --------- Co-authored-by: Federico Caselli <[email protected]>
- Loading branch information