ofekisr commented on a change in pull request #16991:
URL: https://github.com/apache/superset/pull/16991#discussion_r759114063



##########
File path: superset/security/manager.py
##########
@@ -974,14 +976,14 @@ def set_perm(  # pylint: disable=unused-argument
                 )
 
     def raise_for_access(
-        # pylint: disable=too-many-arguments,too-many-locals
+        # pylint: disable=too-many-arguments
         self,
-        database: Optional["Database"] = None,
-        datasource: Optional["BaseDatasource"] = None,
-        query: Optional["Query"] = None,
-        query_context: Optional["QueryContext"] = None,
-        table: Optional["Table"] = None,
-        viz: Optional["BaseViz"] = None,
+        database: Optional[Database] = None,
+        datasource: Optional[BaseDatasource] = None,
+        query: Optional[Query] = None,
+        query_context: Optional[QueryContext] = None,
+        table: Optional[Table] = None,
+        viz: Optional[BaseViz] = None,

Review comment:
       > 
   When you use the old method of type hint as string, you actually don't need 
to import the class at all and don't need to put it under TYPE_CHECKING
   but if you would like to use the new better choice for marking the type hint 
by the real type 
   you should import them under TYPE_CHECKING with the __future__ annotations.
   That is the better choice so you can navigate and let the IDEs do their job 
--> assist you 
   
   




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