You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/06/01 18:13:02 UTC

[GitHub] [superset] michael-s-molina commented on a diff in pull request #24197: chore(pre-commit): Add pyupgrade and pycln hooks

michael-s-molina commented on code in PR #24197:
URL: https://github.com/apache/superset/pull/24197#discussion_r1213494886


##########
superset/connectors/sqla/models.py:
##########
@@ -869,8 +858,8 @@ def get_sqla_table(self) -> TableClause:
         return tbl
 
     def get_from_clause(
-        self, template_processor: Optional[BaseTemplateProcessor] = None
-    ) -> Tuple[Union[TableClause, Alias], Optional[str]]:
+        self, template_processor: BaseTemplateProcessor | None = None
+    ) -> tuple[TableClause | Alias, str | None]:

Review Comment:
   It's way more readable then the `Optional` version 😄 



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org