-
Notifications
You must be signed in to change notification settings - Fork 292
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Streamlit Version
1.41.1
Streamlit Authenticator Version
0.4.2
Environment
Ubuntu, python 3.10.12
What happened?
Summary
Possible incorrect type annotation for **kwargs in the Authenticate constructor.
Details
In /views/authentication_view.py, the constructor of the Authenticate class includes the following parameter:
**kwargs: Optional[Dict[str, Any]]However, this annotation seems problematic. **kwargs cannot be typed as a dictionary directly — doing so implies that a single dictionary is expected as the unpacked keyword arguments, which isn't valid Python typing. It would mean that this is acceptable:
Authenticate(credentials, some_key={"foo": bar})But from context, that doesn't seem to be the intended usage.
The more appropriate and syntactically valid form would likely be:
**kwargs: AnySuggestion
If this interpretation is correct, I’d be happy to open a PR to fix it.
Let me know what you think!
What did you expect to happen?
No response
Steps to reproduce
None.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working