fastapi-filter icon indicating copy to clipboard operation
fastapi-filter copied to clipboard

add generic return value for .filter and .sort

Open bobbyrenwick opened this issue 2 years ago β€’ 4 comments

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.

bobbyrenwick avatar Oct 11 '23 08:10 bobbyrenwick

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 11 '23 08:10 netlify[bot]

Codecov Report

Merging #489 (8c75b58) into main (95ae1ad) will not change coverage. The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            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%> (ΓΈ)

codecov[bot] avatar Oct 11 '23 08:10 codecov[bot]

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.

DamianHeardJudo avatar Jun 23 '24 22:06 DamianHeardJudo

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?

arthurio avatar Jul 15 '24 17:07 arthurio