Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: avoid passing redundant arguments to API#1965

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
max-wittig merged 1 commit intomainfromfix/redundant-args-api
Apr 14, 2022

Conversation

nejch
Copy link
Member

Closes#987.

This was already fixed inb9ecc9a but partially reintroduced with the globalretry_transient_errors feature.

@codecov-commenter
Copy link

Codecov Report

Merging#1965 (3431887) intomain (0353bd4) willincrease coverage by0.00%.
The diff coverage is100.00%.

@@           Coverage Diff           @@##             main    #1965   +/-   ##=======================================  Coverage   92.56%   92.56%           =======================================  Files          78       78             Lines        4909     4910    +1     =======================================+ Hits         4544     4545    +1  Misses        365      365
FlagCoverage Δ
cli_func_v481.58% <100.00%> (+<0.01%)⬆️
py_func_v480.12% <100.00%> (+<0.01%)⬆️
unit83.48% <100.00%> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/client.py90.58% <100.00%> (+0.02%)⬆️

@max-wittig
Copy link
Member

@nejch Mhmm but where is thatretry_transient_errors is actually removed. I just see that it's set as a self attribute.

@nejch
Copy link
MemberAuthor

@nejch Mhmm but where is thatretry_transient_errors is actually removed. I just see that it's set as a self attribute.

@max-wittig previously it would just get picked from the method's**kwargs via.get():

retry_transient_errors=kwargs.get(
"retry_transient_errors",self.retry_transient_errors
)

but all kwargs are passed as query parameters to the API because they're copied to params earlier:

utils.copy_dict(src=kwargs,dest=params)

I added it as an explicit argument to avoid that. I could have done.pop() from kwargs instead, but it would have to be done before that dict is copied, so I thought it'd be cleaner like this.

@nejchnejch assignedmax-wittig and unassignednejchApr 6, 2022
@nejchnejch requested a review frommax-wittigApril 14, 2022 09:44
@max-wittigmax-wittig merged commitba7692a intomainApr 14, 2022
@max-wittigmax-wittig deleted the fix/redundant-args-api branchApril 14, 2022 17:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JohnVillalovosJohnVillalovosAwaiting requested review from JohnVillalovos

@max-wittigmax-wittigAwaiting requested review from max-wittig

Assignees

@max-wittigmax-wittig

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Additional arguments are passed on to the API
3 participants
@nejch@codecov-commenter@max-wittig

[8]ページ先頭

©2009-2025 Movatter.jp