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:
Suggestion
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.
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
**kwargsin theAuthenticateconstructor.Details
In
/views/authentication_view.py, the constructor of theAuthenticateclass includes the following parameter:However, this annotation seems problematic.
**kwargscannot 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:But from context, that doesn't seem to be the intended usage.
The more appropriate and syntactically valid form would likely be:
Suggestion
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.