From 97eed4b5341c27e37e395885c06c3f9380239efa Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Fri, 3 Jan 2020 14:43:00 +0530 Subject: [PATCH] Fixes mypy error on redefining attribute --- securedrop_proxy/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/securedrop_proxy/proxy.py b/securedrop_proxy/proxy.py index dcdcbc0..733d2ed 100644 --- a/securedrop_proxy/proxy.py +++ b/securedrop_proxy/proxy.py @@ -35,14 +35,14 @@ def __init__(self, conf=None, req=Req(), on_save=None, on_done=None, timeout: fl self.req = req self.res = None self.on_save = on_save - if on_done is not None: + if on_done: self.on_done = on_done self.timeout = float(timeout) if timeout else 10 self._prepared_request = None - def on_done(self, res): + def on_done(self, res): # type: ignore callbacks.on_done(res) @staticmethod