aminghadersohi commented on code in PR #44765:
URL: https://github.com/apache/superset/pull/44765#discussion_r4160487949
##########
superset/models/core.py:
##########
@@ -1260,8 +1303,14 @@ def get_inspector(
catalog: str | None = None,
schema: str | None = None,
) -> Inspector:
- with self.get_sqla_engine(catalog=catalog, schema=schema) as engine:
- yield sqla.inspect(engine)
+ @contextmanager
+ def open_inspector() -> Iterator[Inspector]:
+ with self.get_sqla_engine(catalog=catalog, schema=schema) as
engine:
+ with check_for_oauth2(self):
Review Comment:
Addressed in 5d5a4a29e6: kept the defensive guard, documented its redundancy
with get_sqla_engine’s own check_for_oauth2, and clarified that the stubbed
test pins the guard rather than the real path.
--
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]