Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scopes are incorrectly documented as Sequence[str] type in flow.py #84

Open
Fruglemonkey opened this issue Aug 13, 2020 · 0 comments
Open
Labels
type: docs Improvement to the documentation for an API.

Comments

@Fruglemonkey
Copy link

Fruglemonkey commented Aug 13, 2020

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.

@Fruglemonkey 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
@busunkim96 busunkim96 added the type: docs Improvement to the documentation for an API. label Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

2 participants