add generic return value for .filter and .sort
This preserves the typing information when calling filter.sort and filter.filter on the SQLAlchemy Filters.
This works with pylance but seems like it's failing with mypy on CI.
Deploy Preview for fastapi-filter ready!
| Name | Link |
|---|---|
| Latest commit | 8c75b58cf8f3d7ce8ef58c9a4241ff8b6ec75848 |
| Latest deploy log | https://app.netlify.com/sites/fastapi-filter/deploys/6526564e069f0d0008374bd4 |
| Deploy Preview | https://deploy-preview-489--fastapi-filter.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Codecov Report
Merging #489 (8c75b58) into main (95ae1ad) will not change coverage. The diff coverage is
100.00%.
Additional details and impacted files
@@ Coverage Diff @@
## main #489 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 193 195 +2
=========================================
+ Hits 193 195 +2
| Files | Coverage Ξ | |
|---|---|---|
| fastapi_filter/contrib/sqlalchemy/filter.py | 100.00% <100.00%> (ΓΈ) |
I am curious if the maintainer have have any appetite to get an updated version of this PR merged? As it stands the type hints provide aren't overly useful with mypy.
I like when things work properly, so yes, if we get something that works with both pylance and mypy I would be very happy to merge and ship it! Does it help that support for python 3.8 has dropped?