From 9df922e7facf6a665c7f4c9e8f5a39f475339c54 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 22 Dec 2017 10:15:26 -0800 Subject: [PATCH] mypy: Adjust zulip api slightly, to pass with strict-optional. --- zulip/zulip/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 2aa225f..0f80b38 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -571,7 +571,8 @@ class Client(object): # type: (str, str, Dict[str, Any], bool, List[IO[Any]]) -> Dict[str, Any] if request is None: request = dict() - return self.do_api_query(request, API_VERSTRING + url, method=method, + versioned_url = API_VERSTRING + (url if url is not None else "") + return self.do_api_query(request, versioned_url, method=method, longpolling=longpolling, files=files) def call_on_each_event(self, callback, event_types=None, narrow=None):