-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixed pylint issues for azure-communication-identity #39458
base: main
Are you sure you want to change the base?
Fixed pylint issues for azure-communication-identity #39458
Conversation
API change check API changes are not detected in this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
**kwargs # type: Any | ||
): | ||
# type: (...) -> Tuple[CommunicationUserIdentifier, AccessToken] | ||
scopes: List[Union[str, CommunicationTokenScope]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we not typing out 'token_expires_in' here?
# type: (...) -> AccessToken | ||
user: CommunicationUserIdentifier, | ||
scopes: List[Union[str, CommunicationTokenScope]], | ||
**kwargs: Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here :)
...n/azure-communication-identity/azure/communication/identity/_shared/user_credential_async.py
Show resolved
Hide resolved
...mmunication/azure-communication-identity/azure/communication/identity/_shared/utils_async.py
Show resolved
Hide resolved
async def create_user_and_token( | ||
self, scopes: List[Union[str, "CommunicationTokenScope"]], **kwargs | ||
async def create_user_and_token( # pylint: disable=C4758 | ||
self, scopes: List[Union[str, CommunicationTokenScope]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self, scopes: List[Union[str, CommunicationTokenScope]], | |
self, scopes: List[Union[str, CommunicationTokenScope]],*, token_expires_in: Optional[timedelta] = None |
Is there a reason to not do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l0lawrence these are public APIs and it might bring breaking changes for the customers. Even when I switched to the keyword-readonly values our tests started to fail, so that's why I kept the param in kwargs. Do you think it won't introduce any breaking changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not introduce any breaking changes, when you add it to the method signature I believe it would be an keyword-only arg with a default value of None, and then in the code below on line 104 you would need to remove the kwargs.pop()
Description
Fixed the pylint issues for azure-communication-identity - #34163
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines