mirror of
https://github.com/ihabunek/toot
synced 2025-02-03 20:57:38 +01:00
Remove unused helpers
This commit is contained in:
parent
38eca67905
commit
968a516f76
@ -9,24 +9,6 @@ from typing import Callable, TypeVar
|
|||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
||||||
class MockResponse:
|
|
||||||
def __init__(self, response_data={}, ok=True, is_redirect=False):
|
|
||||||
self.response_data = response_data
|
|
||||||
self.content = response_data
|
|
||||||
self.ok = ok
|
|
||||||
self.is_redirect = is_redirect
|
|
||||||
|
|
||||||
def raise_for_status(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def json(self):
|
|
||||||
return self.response_data
|
|
||||||
|
|
||||||
|
|
||||||
def retval(val):
|
|
||||||
return lambda *args, **kwargs: val
|
|
||||||
|
|
||||||
|
|
||||||
def run_with_retries(fn: Callable[..., T]) -> T:
|
def run_with_retries(fn: Callable[..., T]) -> T:
|
||||||
"""
|
"""
|
||||||
Run the the given function repeatedly until it finishes without raising an
|
Run the the given function repeatedly until it finishes without raising an
|
||||||
|
Loading…
x
Reference in New Issue
Block a user