You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
is it possible to support filter_by check in sqlalchemy #1072
@asukaminato0721 Thank you for the report! Could you provide a bit more detail to help me understand the issue? What are select and Table? (Are the defined somewhere in your code? Imported from SQLAlchemy?)
Thanks, that's really helpful! If the function is annotated with **kwargs: Any in the source, getting more precise types would most likely require hard-coded logic in Pyrefly for SQLAlchemy. That's definitely something we can look into (we've already done something similar for Pydantic), but timeline-wise, it'll likely come after #920 and fixing any obvious bugs.
Activity
rchen152 commentedon Sep 12, 2025
@asukaminato0721 Thank you for the report! Could you provide a bit more detail to help me understand the issue? What are
selectandTable? (Are the defined somewhere in your code? Imported from SQLAlchemy?)asukaminato0721 commentedon Sep 12, 2025
a minimal example:
select ref: https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.select
filter_by: https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select.filter_by
current problem is
sqlalchemy.sql.expression.Select.filter_by(**kwargs: Any) → Self¶
as the signature shows,
Any, so no check here.rchen152 commentedon Sep 12, 2025
Thanks, that's really helpful! If the function is annotated with
**kwargs: Anyin the source, getting more precise types would most likely require hard-coded logic in Pyrefly for SQLAlchemy. That's definitely something we can look into (we've already done something similar for Pydantic), but timeline-wise, it'll likely come after #920 and fixing any obvious bugs.fix is it possible to support filter_by check in sqlalchemy #1072