offlineimap/utils files singleton-comparison

This patch change these errors in the utils folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-30 11:18:18 +02:00
parent 7b082f0fe9
commit da2baaaeb7
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ class ConstProxy():
def __getattr__(self, name): def __getattr__(self, name):
src = self.__dict__['__source'] src = self.__dict__['__source']
if src == None: if src is None:
raise ValueError("using non-initialized ConstProxy() object") raise ValueError("using non-initialized ConstProxy() object")
return copy.deepcopy(getattr(src, name)) return copy.deepcopy(getattr(src, name))
@ -29,6 +29,6 @@ class ConstProxy():
def set_source(self, source): def set_source(self, source):
""" Sets source object for this instance. """ """ Sets source object for this instance. """
if (self.__dict__['__source'] != None): if (self.__dict__['__source'] is not None):
raise ValueError("source object is already set") raise ValueError("source object is already set")
self.__dict__['__source'] = source self.__dict__['__source'] = source

View File

@ -86,7 +86,7 @@ def get_os_sslcertfile():
""" """
l = get_os_sslcertfile_searchpath() l = get_os_sslcertfile_searchpath()
if l == None: if l is None:
return None return None
for f in l: for f in l: