-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
add custom policy #17340
add custom policy #17340
Conversation
Let's align with the other languages on this. Both .NET/C# and Java uses the perCall or perRetry terminology rather than first and last. I have not checked the javascript implementation. |
/azp run python - formrecognizer |
Azure Pipelines successfully started running 1 pipeline(s). |
if isinstance(per_call_policies, Iterable): | ||
for policy in per_call_policies: | ||
policies.append(policy) |
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.
No need to explicitly iterate over per_call_policies
. list.extend(iterable)
does the same thing.
policies = policies + [config.redirect_policy, | ||
config.retry_policy, | ||
config.authentication_policy, | ||
config.custom_hook_policy] |
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.
This causes a new list
object to be created and assigned to policies
. list.extend(iterable)
is a better choice as it modifies policies
directly.
Fix #16519: Support adding custom policy with |
No description provided.