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
In flow.py, scopes are incorrectly documented as Sequence[str] in the classmethod documentation.
As far as I can tell, following the code path back up to oauthlib, scopes ends up being passed to the scope_to_list helper function which can actually take scopes in the format of list, tuple, set, str.
Importantly, set is not considered a sequence, but is useful in the context of scopes - you may have multiple tasks wishing to add to a set of scopes, in which case using set avoids unnecessary duplicates.
Suggestion: Change to Union[list[str], tuple[str], set[str], str] or Union[list[str], tuple[str], set[str]] instead.
The text was updated successfully, but these errors were encountered:
Fruglemonkey
changed the title
Scopes are incorrectly documented as Sequence[str] type.
Scopes are incorrectly documented as Sequence[str] type in flow.py
Aug 13, 2020
In flow.py,
scopes
are incorrectly documented asSequence[str]
in the classmethod documentation.As far as I can tell, following the code path back up to oauthlib,
scopes
ends up being passed to the scope_to_list helper function which can actually take scopes in the format of list, tuple, set, str.Importantly,
set
is not considered asequence
, but is useful in the context of scopes - you may have multiple tasks wishing to add to a set of scopes, in which case usingset
avoids unnecessary duplicates.Suggestion: Change to
Union[list[str], tuple[str], set[str], str]
orUnion[list[str], tuple[str], set[str]]
instead.The text was updated successfully, but these errors were encountered: