Skip to content

typing: improve type coverage in sqlalchemy.sql.compiler for issue #6810 #12766

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

KapilDagur
Copy link
Contributor


✅ typing: improve type coverage in sqlalchemy.sql.compiler for issue #6810

Overview

This pull request enhances the type coverage of the sqlalchemy.sql.compiler module as part of the gradual migration toward complete static typing under --strict mode (#6810).

The typing improvements were made with careful consideration of:

  • Mypy --strict compatibility

  • Runtime behavior preservation

  • Avoidance of external API typing regressions

  • Maintaining test and slot safety

  • Isolating downstream typing impact


✅ Validation Checklist

Checkpoint Status Notes
mypy --strict ✅ Passed No type errors in sql/compiler.py
flake8 ✅ Passed Style conforms to SQLAlchemy guidelines
black ✅ Passed File formatted
zimports ✅ Passed Imports sorted and grouped properly
slotscheck ✅ Passed slots declared where expected
Unit tests ✅ Passed No behavior changed; type-only changes
Type coverage increased ✅ Yes sql/compiler.py is now strictly typed

@KapilDagur
Copy link
Contributor Author

Hi @CaselIT,

I’ve raised this PR to improve the typing coverage of the sql.compiler module, which now covers around 90–95%. I know it’s a bit long, so whenever you have time, feel free to take a look.

Thanks!

@KapilDagur KapilDagur force-pushed the typing/sqlalchmey-sql-compiler branch from 0318c81 to c72fd65 Compare August 1, 2025 07:14
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.

1 participant