From 549f24360b0c870cbbd7ecb5ee4c92843d6fe02c Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 9 Apr 2019 08:55:15 +1000 Subject: [PATCH] Try and appease linter --- rest_framework/compat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 3e1706b6a..037234baa 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -187,9 +187,9 @@ try: if not hasattr(markdown, '__version__') and markdown.version <= '2.2': HEADERID_EXT_PATH = 'headerid' LEVEL_PARAM = 'level' - elif not hasattr(markdown, '__version__') or ( - type(markdown.__version__) != type('') and markdown.version < '2.6' - ): + elif (not hasattr(markdown, '__version__') or + (isinstance(markdown.__version__, type('')) + and markdown.version < '2.6')): HEADERID_EXT_PATH = 'markdown.extensions.headerid' LEVEL_PARAM = 'level' else: