Skip to content

Check SQLAlchemy update values against mapped fields#4047

Open
WilliamK112 wants to merge 1 commit into
facebook:mainfrom
WilliamK112:codex/pyrefly-sqlalchemy-values-4046
Open

Check SQLAlchemy update values against mapped fields#4047
WilliamK112 wants to merge 1 commit into
facebook:mainfrom
WilliamK112:codex/pyrefly-sqlalchemy-values-4046

Conversation

@WilliamK112

Copy link
Copy Markdown

Summary:

  • Add a focused SQLAlchemy check for sqlalchemy.update(Model)...values(field=...) keyword arguments.
  • Validate explicit values() keyword names against Mapped[...] fields on the model, and validate value types against the mapped instance attribute type.
  • Cover chained update calls such as .where(...).values(...) with a regression test for support sqlalchemy update values field check #4046.

Closes #4046.

Validation:

  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib test::descriptors (50 passed)
  • Real sqlalchemy==2.0.41 temp sample reports the expected credential_id type error, name type error, and missing_field unknown-field error
  • cargo +stable-x86_64-pc-windows-gnu fmt --all --check
  • git diff --check
  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib reached 6184 passed / 5 failed; the 5 failures were shape_dsl Test took too long (> 20s) watchdog failures under the full-suite load, and each failed test passed when rerun individually

@meta-cla meta-cla Bot added the cla signed label Jul 5, 2026
@github-actions github-actions Bot added the size/l label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support sqlalchemy update values field check

1 participant