]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Update generic associations examples for strict typing
authorMike Fiedler <miketheman@gmail.com>
Tue, 20 Jan 2026 18:22:46 +0000 (13:22 -0500)
committersqla-tester <sqla-tester@sqlalchemy.org>
Tue, 20 Jan 2026 18:22:46 +0000 (13:22 -0500)
commit8e5b76b3d605a5dbbac4a6b4dbf7fab38cd4c2f7
treebb06c07d68fabe3fa0bf199796fb3857fb72f17f
parentda9f9e19c61e813aa97421afbbfbfa63259666c9
Update generic associations examples for strict typing

### Description

Following previous work in #10450 and #12031, add more type hints to the examples.

I added a new test case to exercise these examples in the future as well.

### Checklist

This pull request is:

- [x] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed

**Have a nice day!**

Closes: #13082
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13082
Pull-request-sha: 7a2bed3f6d9fe33c621ac2a6ca56364fa5fe7053

Change-Id: Ia143abbc4c8491c2976203d1b99162652b26b417
examples/generic_associations/discriminator_on_association.py
examples/generic_associations/generic_fk.py
examples/generic_associations/table_per_association.py
examples/generic_associations/table_per_related.py
test/typing/test_mypy.py