You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/11 09:18:35 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #20214: Fixing MyPy issues in www fab_security manager

uranusjr commented on a change in pull request #20214:
URL: https://github.com/apache/airflow/pull/20214#discussion_r767133416



##########
File path: airflow/www/fab_security/manager.py
##########
@@ -104,12 +106,18 @@ class BaseSecurityManager:
     """ Flask-OpenID OpenID """
     oauth = None
     """ Flask-OAuth """
-    oauth_remotes = None
+    oauth_remotes: Dict[str, Any]
     """ OAuth email whitelists """
-    oauth_whitelists = {}
+    oauth_whitelists: Dict[str, List]
     """ Initialized (remote_app) providers dict {'provider_name', OBJ } """
-    oauth_tokengetter = _oauth_tokengetter
-    """ OAuth tokengetter function override to implement your own tokengetter method """
+
+    @staticmethod
+    def oauth_tokengetter():
+        """Authentication (OAuth) token getter function.
+        Override to implement your own token getter method
+        """
+        return _oauth_tokengetter

Review comment:
       What is the error here? It should be OK to just annotate this as `oauth_tokengetter: Any = _oauth_tokengetter` since it is only passed onward to Flask-Appbuilder internals.




-- 
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: commits-unsubscribe@airflow.apache.org

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