You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/11 09:10:24 UTC

[GitHub] [superset] villebro commented on a change in pull request #17967: chore: use new FAB functionality for component schemas update OAS

villebro commented on a change in pull request #17967:
URL: https://github.com/apache/superset/pull/17967#discussion_r781925033



##########
File path: superset/views/base_api.py
##########
@@ -217,33 +213,19 @@ class BaseSupersetModelRestApi(ModelRestApi):
     }
 
     def __init__(self) -> None:
+        super().__init__()
         # Setup statsd
         self.stats_logger = BaseStatsLogger()
         # Add base API spec base query parameter schemas
         if self.apispec_parameter_schemas is None:  # type: ignore
             self.apispec_parameter_schemas = {}
         self.apispec_parameter_schemas["get_related_schema"] = get_related_schema
-        if self.openapi_spec_component_schemas is None:
-            self.openapi_spec_component_schemas = ()
-        self.openapi_spec_component_schemas = self.openapi_spec_component_schemas + (
+        self.openapi_spec_component_schemas: Tuple[
+            Type[Schema], ...
+        ] = self.openapi_spec_component_schemas + (

Review comment:
       Do we really need this type declaration? Seems like this should be enough:
   ```suggestion
           self.openapi_spec_component_schemas = self.openapi_spec_component_schemas + (
   ```




-- 
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