litl / backoff

Python library providing function decorators for configurable backoff and retry
MIT License
2.61k stars 148 forks source link

Enable use with staticmethods #201

Closed spokeydokeys closed 2 months ago

spokeydokeys commented 1 year ago

This PR adds functionality to extract the underlying functions from staticmethods.

For each specified method (including the wrapped method and any on_backoff/on_giveup/on_success methods), it checks if it's a staticmethod and if so extracts the wrapped function from target.__func__

spokeydokeys commented 1 year ago

This is in reference to https://github.com/litl/backoff/issues/200