Fixes: #8776
### Checklist
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
Closes: #8779
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8779
Pull-request-sha:
2bc64555a1ab662881fdfd1caaabd9d21fbdf531
Change-Id: I52fe6db5ba954a6039836b45f0e89ad96049df03
--- /dev/null
+.. change::
+ :tags: bug, orm
+ :tickets: 8776
+
+ Fixed issue where passing a callbale function returning an iterable
+ of column elements to :paramref:`_orm.relationship.order_by` was
+ flagged as an error in type checkers.
Literal[False],
str,
_ColumnExpressionArgument[Any],
+ Callable[[], Iterable[ColumnElement[Any]]],
Iterable[Union[str, _ColumnExpressionArgument[Any]]],
]
_ORMBackrefArgument = Union[str, Tuple[str, Dict[str, Any]]]