You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
Description of the Issue
Your docs show this example:
Note the
...OPEN.value
. This is causing a type hint issue, because the literal string'open'
does not match your definition foraccess
argument:It is expecting
AddShareLinkToFolderSharedLinkAccessField
only, e.g..OPEN
Shouldn't the type hint be
access: Optional[str] = None
?ps: Your box Developer Forum link is broken, above.
Steps to Reproduce
Edit your example code in IDE.
Expected Behavior
I think this is a frustrating issue with Python enum type hinting, per https://stackoverflow.com/a/67292548/515368 this answer.
I think you have to type hint with
Literal[Enum.value1, Enum.Value2, ...]
to fix this, or simply accept type ofstr
(my preferred solution).Error Message, Including Stack Trace
No errors, just type hinting.
Screenshots
Versions Used
Python SDK:
box-sdk-gen 1.3.0
Python:
3.10.12
The text was updated successfully, but these errors were encountered: