Skip to content
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

SG-35529 Minor code refactoring: Clarify the use of _build_opener in download_attachment #343

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

julien-lang
Copy link
Contributor

@julien-lang julien-lang commented May 31, 2024

Clarify the use of _build_opener in download_attachment

Before this change, download_attachment indirectly used _build_opener by calling
set_up_auth_cookie. This was misleading because the name of the function, set_up_auth_cookie, does not indicate that it will return a request handler object.

Since set_up_auth_cookie is only used by download_attachment, I suggest this small refactoring making download_attachment directly call _build_opener with an optional cookie handler if necessary.

This PR renames/transforms the set_up_auth_cookie function to get_auth_cookie_handler.

@julien-lang julien-lang changed the title Minor code refactoring: make download_attachment directly use _build_opener SG-35529 Minor code refactoring: make download_attachment directly use _build_opener May 31, 2024
@julien-lang julien-lang changed the title SG-35529 Minor code refactoring: make download_attachment directly use _build_opener SG-35529 Minor code refactoring: Clarify the use of _build_opener in download_attachment Jun 3, 2024
@julien-lang julien-lang marked this pull request as ready for review June 3, 2024 21:49
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julien-lang julien-lang merged commit 0323312 into master Jun 6, 2024
24 checks passed
@julien-lang julien-lang deleted the julien/refactoring-25-05 branch June 6, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants