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

Unclear documentation - backoff_max_tries #784

Closed
kalyanr23 opened this issue Jul 2, 2022 · 4 comments · Fixed by #868
Closed

Unclear documentation - backoff_max_tries #784

kalyanr23 opened this issue Jul 2, 2022 · 4 comments · Fixed by #868

Comments

@kalyanr23
Copy link

https://sdk.meltano.com/en/latest/classes/singer_sdk.RESTStream.html#singer_sdk.RESTStream.backoff_max_tries

Here, annotations show that the method should return int. But, description says, it can be set to None for retrying indefinitely.
Can it be updated to include None in the return types or maybe use a -1 for indefinite retries?

@edgarrmondragon
Copy link
Collaborator

Hi @kalyanr23!

Thanks for reporting. You're right that it's nullable, and in fact it can also be a callable. The library uses the type annotation Optional[_MaybeCallable[int]], where _MaybeCallable is a generic wrapper: https://github.com/litl/backoff/blob/92e7b6e910accee30118a6f3d2cef4c62caa38f5/backoff/_typing.py#L39

I think we can do a similar thing, and maybe even for the other parameters too. Would you be willing to submit a PR?

@kalyanr23
Copy link
Author

Sure. i'll submit a PR

@edgarrmondragon
Copy link
Collaborator

that's great @kalyanr23, thanks!

@edgarrmondragon
Copy link
Collaborator

This is being tackled by @rawwar on #868 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants