mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
style: always use x is not None
instead of not x is None
Differential Revision: https://phab.mercurial-scm.org/D842
This commit is contained in:
parent
7dafbbbbcf
commit
3f0d5f185a
@ -393,7 +393,7 @@ class HTTPResponse(httplib.HTTPResponse):
|
||||
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
|
||||
|
@ -80,7 +80,7 @@ class IndexObject(BaseIndexObject):
|
||||
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 @@ class InlinedIndexObject(BaseIndexObject):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user