<!-- Provide a general summary of your proposed changes in the Title field above -->
### Description
_get_bind_args is strange method in query module. It is called only in one place. It takes self(but don't use it) and two args with Any type. I think it must be static method with typehints if it will has more use cases in the future. But now removing is more simple solution.
### Checklist
This pull request is:
- [x] A short code fix
**Have a nice day!**
Closes: #11098
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11098
Pull-request-sha:
dc997911a68e455419080a782778c56eceaa76f5
Change-Id: I53b960b3f2864a2db24ffa0058ab0569a721b11a
try:
bind = (
- self._get_bind_args(statement, self.session.get_bind)
+ self.session.get_bind(clause=statement)
if self.session
else None
)
return str(statement.compile(bind))
- def _get_bind_args(self, statement: Any, fn: Any, **kw: Any) -> Any:
- return fn(clause=statement, **kw)
-
@property
def column_descriptions(self) -> List[ORMColumnDescription]:
"""Return metadata about the columns which would be