This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new bf1c2da039a Fix mypy static errors in fab provider (#57761)
bf1c2da039a is described below

commit bf1c2da039a59dc378df7350c25183d37edd5a9e
Author: Vincent <[email protected]>
AuthorDate: Mon Nov 3 15:48:58 2025 -0500

    Fix mypy static errors in fab provider (#57761)
---
 .../src/airflow/providers/fab/auth_manager/api_fastapi/sorting.py    | 5 ++++-
 providers/fab/src/airflow/providers/fab/www/app.py                   | 2 ++
 providers/fab/www-hash.txt                                           | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/sorting.py 
b/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/sorting.py
index 9d3fb14906d..b19d43cb9c8 100644
--- 
a/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/sorting.py
+++ 
b/providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/sorting.py
@@ -23,10 +23,13 @@ from fastapi import HTTPException, status
 from sqlalchemy import asc, desc
 
 if TYPE_CHECKING:
+    from sqlalchemy.orm import InstrumentedAttribute
     from sqlalchemy.sql.elements import ColumnElement
 
 
-def build_ordering(order_by: str, *, allowed: Mapping[str, 
ColumnElement[Any]]) -> ColumnElement[Any]:
+def build_ordering(
+    order_by: str, *, allowed: Mapping[str, ColumnElement[Any]] | Mapping[str, 
InstrumentedAttribute[Any]]
+) -> ColumnElement[Any]:
     """
     Build an SQLAlchemy ORDER BY expression from the `order_by` parameter.
 
diff --git a/providers/fab/src/airflow/providers/fab/www/app.py 
b/providers/fab/src/airflow/providers/fab/www/app.py
index 69448fbb1b8..e12fd064c09 100644
--- a/providers/fab/src/airflow/providers/fab/www/app.py
+++ b/providers/fab/src/airflow/providers/fab/www/app.py
@@ -85,6 +85,8 @@ def create_app(enable_plugins: bool):
     csrf.init_app(flask_app)
 
     db = SQLAlchemy(flask_app)
+    if settings.Session is None:
+        raise RuntimeError("Session not configured. Call configure_orm() 
first.")
     db.session = settings.Session
 
     configure_logging()
diff --git a/providers/fab/www-hash.txt b/providers/fab/www-hash.txt
index 631b5559a77..0a53800f897 100644
--- a/providers/fab/www-hash.txt
+++ b/providers/fab/www-hash.txt
@@ -1 +1 @@
-7a1e18d5c6ae8a2fe65e6e36e21549a9a5067e2c1866a2047e88e355d7bec373
+1074f052d6e1b982be7b333efd08d4c28ede680aa3b135504f0e0b519443205f

Reply via email to