rusackas commented on code in PR #41179:
URL: https://github.com/apache/superset/pull/41179#discussion_r3432626625


##########
tests/integration_tests/reports/commands_tests.py:
##########
@@ -37,6 +36,13 @@
 )
 from sqlalchemy.sql import func
 
+try:
+    # Flask-SQLAlchemy 3.x (required by SQLAlchemy 2.0)
+    from flask_sqlalchemy.query import Query as BaseQuery
+except ImportError:  # pragma: no cover
+    # Flask-SQLAlchemy 2.x
+    from flask_sqlalchemy import BaseQuery

Review Comment:
   It is just a six-line import fallback that goes away entirely once we are on 
FSA 3.x, so I would rather not stand up a shared shim module for it. Happy to 
dedupe if it outlives the bump.



##########
superset/connectors/sqla/models.py:
##########
@@ -335,7 +335,7 @@ def is_virtual(self) -> bool:
         return self.kind == DatasourceKind.VIRTUAL
 
     @declared_attr
-    def slices(self) -> RelationshipProperty:
+    def slices(self) -> Mapped[list["Slice"]]:

Review Comment:
   This one is intentional 2.0 prep, the whole point is moving toward 
`Mapped[...]` annotations ahead of the declarative flip. mypy is happy with it 
on 1.4, so I am inclined to leave it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to