From d198eedbcd36d4d4665d3e902b8846563c3cb8fb Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Mon, 27 Jun 2016 20:56:13 +0530 Subject: [PATCH] api/zulip/__init__.py: Make compatible with newer mypy. --- zulip/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip/__init__.py b/zulip/__init__.py index a9ef21e..12dade9 100644 --- a/zulip/__init__.py +++ b/zulip/__init__.py @@ -247,10 +247,10 @@ class Client(object): request = {} for (key, val) in six.iteritems(orig_request): - if not (isinstance(val, str) or isinstance(val, six.text_type)): - request[key] = simplejson.dumps(val) - else: + if isinstance(val, str) or isinstance(val, six.text_type): request[key] = val + else: + request[key] = simplejson.dumps(val) query_state = { 'had_error_retry': False,