# HG changeset patch # User Alex Gaynor # Date 1506700183 0 # Node ID 5313325025681f8996953bc3f91225e285962453 # Parent 89aec1834a86003def3b6656863e48c5d41a858f style: always use `x is not None` instead of `not x is None` Differential Revision: https://phab.mercurial-scm.org/D842 diff -r 89aec1834a86 -r 531332502568 mercurial/keepalive.py --- a/mercurial/keepalive.py Sun Apr 24 18:41:23 2016 +0900 +++ b/mercurial/keepalive.py Fri Sep 29 15:49:43 2017 +0000 @@ -393,7 +393,7 @@ def read(self, amt=None): # the _rbuf test is only in this first if for speed. It's not # logically necessary - if self._rbuf and not amt is None: + if self._rbuf and amt is not None: L = len(self._rbuf) if amt > L: amt -= L diff -r 89aec1834a86 -r 531332502568 mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py Sun Apr 24 18:41:23 2016 +0900 +++ b/mercurial/pure/parsers.py Fri Sep 29 15:49:43 2017 +0000 @@ -80,7 +80,7 @@ return i * indexsize def __delitem__(self, i): - if not isinstance(i, slice) or not i.stop == -1 or not i.step is None: + if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: raise ValueError("deleting slices only supports a:-1 with step 1") i = self._fix_index(i.start) if i < self._lgt: @@ -114,7 +114,7 @@ return count def __delitem__(self, i): - if not isinstance(i, slice) or not i.stop == -1 or not i.step is None: + if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: raise ValueError("deleting slices only supports a:-1 with step 1") i = self._fix_index(i.start) if i < self._lgt: