<#3256 Fix type annotation of poll_token_endpoint>...
# flyte-github
c
#3256 Fix type annotation of poll_token_endpoint Pull request opened by ZhouGongZiBBS ## Tracking issue Fix the type annotation of scope in the poll_token_endpoint function. It should be a list of strings instead of a single string. ## Why are the changes needed? The type annotation of the function is not correct, not only causing confusion, but potentially dangerous in the future: for a List of string v.s. string, if there is anything like a
for loop
against, the expected behavior would be different. By then, it would be difficult to detect. ## What changes were proposed in this pull request? Fix the type annotation from single string to List of strings. ## How was this patch tested? The unit tests are correct w.r.t to the scope type. The current behavior are the same. ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link https://bito.ai#summarystart| ### Summary by Bito This pull request enhances the type safety of the 'poll_token_endpoint' function by updating the 'scopes' parameter type annotation from a single string to a list of strings. This modification aims to prevent runtime errors and improve clarity in future code usage. flyteorg/flytekit