From 2cb2ed4a31826349ad81e39a5c035a7eed98c6b1 Mon Sep 17 00:00:00 2001 From: Jose Manuel Delicado Date: Mon, 9 Oct 2017 18:11:24 +0200 Subject: [PATCH] Twython/api.py: suggested changes in review have been made for pull request 460 --- twython/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twython/api.py b/twython/api.py index 577d6a6..0ee942c 100644 --- a/twython/api.py +++ b/twython/api.py @@ -140,7 +140,7 @@ class Twython(EndpointsMixin, object): params = params or {} func = getattr(self.client, method) - if type(params) is dict: + if isinstance(params, dict): params, files = _transparent_params(params) else: params = params @@ -196,14 +196,14 @@ class Twython(EndpointsMixin, object): error_message, error_code=response.status_code, retry_after=response.headers.get('X-Rate-Limit-Reset')) - content="" + content = '' try: if response.status_code == 204: content = response.content else: content = response.json() except ValueError: - if response.content!="": + if response.content != '': raise TwythonError('Response was not valid JSON. \ Unable to decode.')