Closed fenchu closed 1 year ago
Thanks for creating a ticket and reporting this.
In type_enforced
, Union
should not be used. Check out the docs here: https://github.com/connor-makowski/type_enforced#getting-started
Specifically:
You can pass multiple types in brackets to validate one of multiple types. For example, you could validate an input was an int or a float with [int, float].
In this case, you should be able to pass in your Union statement simply as a list. EG:
@type_enforced.Enforcer
def update_users_group(myenv:str, group:str, ssn:[list,str], op:str='list', access_token:str=None, ok500:bool=True):
""" add or remove user or a list of users to group """
Let me know if this does not resolve your issue.
Closing this issue. Feel free to reopen it if you feel that your issue was not handled.
This works fine, I'm just used to Union[List,str]
but easier to write `[list,str] Works great. Thanks
giving:
Union Doc