mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-06 17:01:07 -04:00
46304b3afd
<!-- Provide a general summary of your proposed changes in the Title field above --> ### Description When reading more of the Generic Associations, I found that the examples state "Annotated example", and wondered what that meant, since in other parts of the docs that means they are using the new 2.0 style. I tried to update this example to be more in line with the new style, including a little f-string update. I completely understand this is unlikely to be merged as-is - but wanted to understand more about the right way to use modern styles to properly code well-hinted, more "exotic" implementations. Outstanding questions: - Should examples pass pass `mypy --strict` ? It doesn't right now. - Are there better ways to apply `Mapped` within the `type(...)` definition, so we could skip importing `Integer`? ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: (Do non-running examples count as code fixes/features?) - [x] A documentation / typographical / small typing error fix - Good to go, no issue or tests are needed **Have a nice day!** Closes: #10450 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10450 Pull-request-sha:a6a54d6948Change-Id: Ie7c7526daed5bf907d41f666459759b9a986b8c2 (cherry picked from commit7b9ee3daea)