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 2020/06/21 16:34:33 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #10124: refactor: Re-enable lint for 3 files

john-bodley commented on a change in pull request #10124:
URL: https://github.com/apache/incubator-superset/pull/10124#discussion_r443235543



##########
File path: superset/views/core.py
##########
@@ -453,7 +455,8 @@ def slice_json(self, slice_id: int) -> FlaskResponse:
     @api
     @has_access_api
     @expose("/annotation_json/<int:layer_id>")
-    def annotation_json(self, layer_id: int) -> FlaskResponse:
+    @staticmethod

Review comment:
       Does this work?

##########
File path: superset/views/core.py
##########
@@ -506,8 +509,8 @@ def explore_json(
         response_type = utils.ChartDataResultFormat.JSON.value
         responses: List[
             Union[utils.ChartDataResultFormat, utils.ChartDataResultType]
-        ] = [resp_format for resp_format in utils.ChartDataResultFormat]
-        responses.extend([resp_type for resp_type in utils.ChartDataResultType])
+        ] = list(utils.ChartDataResultFormat)

Review comment:
       Yay!

##########
File path: superset/views/core.py
##########
@@ -361,15 +362,16 @@ def clean_fulfilled_requests(session: Session) -> None:
         else:
             flash(__("You have no permission to approve this request"), "danger")
             return redirect("/accessrequestsmodelview/list/")
-        for r in requests:
-            session.delete(r)
+        for request_ in requests:
+            session.delete(request_)

Review comment:
       I think `request` is a viable non-conflicting name.




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

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