From: Karthikeyan Singaravelan Date: Thu, 9 Apr 2020 14:26:11 +0000 (+0000) Subject: Fix SyntaxWarning over comparison of literals using is X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=0e7deb16308f72852ab3c7ea87766e4fccc3cc75;p=chevron.git Fix SyntaxWarning over comparison of literals using is --- 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