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

refactor: use explicit client keyword arguments #54

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Dec 5, 2023

I've refactored client keyword arguments to use explicit ones instead of mixing those with **kwargs, which has a few advantages:

  1. It's more explicit.
  2. With more comprehensive typing – perhaps a follow-up PR 😉 –, typing those arguments would be easier when they are explicit.
  3. AFAIK, the previous timeout argument in HTTPFileSystem.__init__() was a dummy because the HTTP(S) config schemas don't declare a timeout setting, neither via REMOTE_COMMON nor via HTTP_COMMON.
  4. Popping those settings in HTTPFileSystem.get_client(), introduced in fix get_client #32, is dirty because it's a side-effect whose "correctness" may depend on order of execution. With the change in this PR, it works without a side-effect.

@efiop efiop merged commit f5637d5 into iterative:main Dec 5, 2023
@sisp sisp deleted the refactor/client-kwargs branch December 5, 2023 17:33
@efiop
Copy link
Contributor

efiop commented Dec 5, 2023

Thanks @sisp !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants