Skip to content

Commit

Permalink
Merge pull request #611 from tirkarthi/fix-warnings
Browse files Browse the repository at this point in the history
Fix syntax warning over comparison of literals using is.
  • Loading branch information
lkraider committed Aug 13, 2021
2 parents da08d3b + 5a4efbb commit 8763940
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schematics/validate.py
Expand Up @@ -127,7 +127,7 @@ def prepare_validator(func, argcount):
if len(func_args) < argcount:
@functools.wraps(func)
def newfunc(*args, **kwargs):
if not kwargs or kwargs.pop('context', 0) is 0:
if not kwargs or kwargs.pop('context', 0) == 0:
args = args[:-1]
return func(*args, **kwargs)
return newfunc
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -8,7 +8,7 @@


with open(os.path.join(os.path.dirname(__file__), 'schematics/__init__.py')) as f:
version = re.search("^__version__ = '(\d\.\d+\.\d+(\.?(dev|a|b|rc)\d?)?)'$",
version = re.search(r"^__version__ = '(\d\.\d+\.\d+(\.?(dev|a|b|rc)\d?)?)'$",
f.read(), re.M).group(1)

setup(
Expand Down

0 comments on commit 8763940

Please sign in to comment.