From 0e7deb16308f72852ab3c7ea87766e4fccc3cc75 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Thu, 9 Apr 2020 14:26:11 +0000 Subject: [PATCH] Fix SyntaxWarning over comparison of literals using is --- chevron/renderer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chevron/renderer.py b/chevron/renderer.py index 99415da..58817ef 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -74,8 +74,7 @@ def _get_key(key, scopes): # Return an empty string if falsy, with two exceptions # 0 should return 0, and False should return False - # While using is for this check is undefined it works and is fast - if scope is 0: # noqa: F632 + if scope == 0: return 0 if scope is False: return False -- 2.47.3