Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add generic return value for .filter and .sort #489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bobbyrenwick
Copy link

@bobbyrenwick bobbyrenwick commented Oct 11, 2023

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.

@netlify
Copy link

netlify bot commented Oct 11, 2023

Deploy Preview for fastapi-filter ready!

Name Link
🔨 Latest commit 8c75b58
🔍 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.

@codecov
Copy link

codecov bot commented Oct 11, 2023

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%> (ø)

@DamianHeardJudo
Copy link

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.

@arthurio
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants