Skip to content

Conversation

@xiangyan99
Copy link
Member

No description provided.

@xiangyan99 xiangyan99 requested a review from lmazuel as a code owner March 15, 2021 16:37
@ghost ghost added the Azure.Core label Mar 15, 2021
@xiangyan99
Copy link
Member Author

#16519

@johanste
Copy link
Member

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.

@xiangyan99
Copy link
Member Author

/azp run python - formrecognizer

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xiangyan99 xiangyan99 requested a review from johanste March 22, 2021 20:43
@xiangyan99 xiangyan99 requested a review from annatisch March 24, 2021 21:22
Comment on lines +125 to +127
if isinstance(per_call_policies, Iterable):
for policy in per_call_policies:
policies.append(policy)
Copy link
Member

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.

Comment on lines +131 to +134
policies = policies + [config.redirect_policy,
config.retry_policy,
config.authentication_policy,
config.custom_hook_policy]
Copy link
Member

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.

@jiasli jiasli mentioned this pull request Apr 23, 2021
@jiasli
Copy link
Member

jiasli commented Apr 23, 2021

Fix #16519: Support adding custom policy with per_call_policies, per_call_policies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants