From bfa42cf0a84ba9bf4f25820cfa201eea5ef549ab Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Fri, 12 Apr 2019 10:13:27 +1000 Subject: [PATCH] Flake8 has some strange binary operator not allowed at beginning or end of line rules --- 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 9d8be0599..740c0ada0 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 - (isinstance(markdown.__version__, type('')) - and markdown.version < '2.6')): + elif ((not hasattr(markdown, '__version__') + ) or ((not isinstance(markdown.__version__, type('')) + ) and markdown.version < '2.6')): HEADERID_EXT_PATH = 'markdown.extensions.headerid' LEVEL_PARAM = 'level' else: