We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af10cd6 commit f5d0a67Copy full SHA for f5d0a67
scripts/ci/pre_commit/usage_session_query.py
@@ -36,7 +36,11 @@ def check_session_query(mod: ast.Module) -> int:
36
and isinstance(node.func.value, ast.Name)
37
and node.func.value.id == "session"
38
):
39
- console.print(f"Remove session.query from line {node.lineno}")
+ console.print(
40
+ f"\nUse of legacy `session.query` detected on line {node.lineno}. "
41
+ f"\nSQLAlchemy 2.0 deprecates the `Query` object"
42
+ f"use the `select()` construct instead."
43
+ )
44
errors += 1
45
return errors
46
0 commit comments