villebro commented on code in PR #25532:
URL: https://github.com/apache/superset/pull/25532#discussion_r1347493549


##########
superset/utils/machine_auth.py:
##########
@@ -43,15 +43,15 @@
 class MachineAuthProvider:
     def __init__(
         self,
-        auth_webdriver_func_override: Callable[[WebDriver, User], WebDriver],
-        auth_context_func_override: Callable[[BrowserContext, User], 
BrowserContext],
+        auth_webdriver_func_override: Callable[
+            [WebDriver | BrowserContext, User], WebDriver | BrowserContext
+        ],

Review Comment:
   The way we were using these was IMO incorrect - previously 
`auth_webdriver_func_override` was in fact optional, not always a `Callable`. 
So I propose changing the sig to make these optional, and defaulting them to 
`None`, like so:
   
   ```python
   auth_webdriver_func_override: Callable[[WebDriver, User], WebDriver] | None 
= None,
   ```
   
   



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