From 2756fb87e3cef1d0ede04017c3ad9bfe407fc899 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 25 Oct 2021 12:29:28 -0700 Subject: [PATCH] Add docstring for monkeypatch_requests. --- voussoirkit/httperrors.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/voussoirkit/httperrors.py b/voussoirkit/httperrors.py index 2376336..9987626 100644 --- a/voussoirkit/httperrors.py +++ b/voussoirkit/httperrors.py @@ -242,6 +242,11 @@ class HTTP599(HTTP5XX): pass _requests_raise_for_status = requests.Response.raise_for_status def monkeypatch_requests(): + ''' + This function will replace requests.Response.raise_for_status with our + function. You can use this if one of your dependency modules uses requests + and raises HTTPErrors, but you want it to raise these errors instead. + ''' import requests requests.Response.raise_for_status = raise_for_status