]> Devi Nivas Git - chevron.git/commitdiff
Fix SyntaxWarning over comparison of literals using is
authorKarthikeyan Singaravelan <tir.karthi@gmail.com>
Thu, 9 Apr 2020 14:26:11 +0000 (14:26 +0000)
committerKarthikeyan Singaravelan <tir.karthi@gmail.com>
Thu, 30 Apr 2020 12:50:07 +0000 (12:50 +0000)
chevron/renderer.py

index 99415da97fbea56901e1fc7900d16b77c2e24680..58817eff862fc1292d186383f852fd41684e7b61 100644 (file)
@@ -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