mirror of
https://github.com/LibreOffice/dictionaries.git
synced 2025-08-16 15:58:08 +00:00
Python: use is None/is not None instead of == None/!= None
Change-Id: Id5d2fdd780ad703deb893df567e716e913efdf64 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/170361 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
This commit is contained in:
@ -69,7 +69,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def loadData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_en.lopts[sWindowName]:
|
||||
@ -85,7 +85,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def saveData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_en.lopts[sWindowName]:
|
||||
|
@ -35,7 +35,7 @@ def option(lang, opt):
|
||||
|
||||
# filtering affix fields (ds, is, ts etc.)
|
||||
def onlymorph(st):
|
||||
if st != None:
|
||||
if st is not None:
|
||||
st = re.sub(r"^.*(st:|po:)", r"\\1", st) # keep last word part
|
||||
st = re.sub(r"\\b(?=[dit][sp]:)","@", st) # and its affixes
|
||||
st = re.sub(r"(?<!@)\\b\w\w:\w+","", st).replace('@','').strip()
|
||||
@ -138,9 +138,9 @@ def wordmin(s, n):
|
||||
def calc(funcname, par):
|
||||
global calcfunc
|
||||
global SMGR
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
calcfunc = SMGR.createInstance( "com.sun.star.sheet.FunctionAccess")
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
return None
|
||||
return calcfunc.callFunction(funcname, par)
|
||||
|
||||
|
@ -69,7 +69,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def loadData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_hu_HU.lopts[sWindowName]:
|
||||
@ -85,7 +85,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def saveData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_hu_HU.lopts[sWindowName]:
|
||||
|
@ -36,7 +36,7 @@ def option(lang, opt):
|
||||
|
||||
# filtering affix fields (ds, is, ts etc.)
|
||||
def onlymorph(st):
|
||||
if st != None:
|
||||
if st is not None:
|
||||
st = re.sub(r"^.*(st:|po:)", r"\\1", st) # keep last word part
|
||||
st = re.sub(r"\\b(?=[dit][sp]:)","@", st) # and its affixes
|
||||
st = re.sub(r"(?<!@)\\b\w\w:\w+","", st).replace('@','').strip()
|
||||
@ -141,9 +141,9 @@ def wordmin(s, n):
|
||||
def calc(funcname, par):
|
||||
global calcfunc
|
||||
global SMGR
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
calcfunc = SMGR.createInstance( "com.sun.star.sheet.FunctionAccess")
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
return None
|
||||
return calcfunc.callFunction(funcname, par)
|
||||
|
||||
|
@ -69,7 +69,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def loadData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_pt_BR.lopts[sWindowName]:
|
||||
@ -85,7 +85,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def saveData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_pt_BR.lopts[sWindowName]:
|
||||
|
@ -69,7 +69,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def loadData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_ru_RU.lopts[sWindowName]:
|
||||
@ -85,7 +85,7 @@ class LightproofOptionsEventHandler( unohelper.Base, XServiceInfo, XContainerWin
|
||||
|
||||
def saveData(self, aWindow):
|
||||
sWindowName = self.getWindowName(aWindow)
|
||||
if (sWindowName == None):
|
||||
if (sWindowName is None):
|
||||
return
|
||||
child = self.getChild(sWindowName)
|
||||
for i in lightproof_opts_ru_RU.lopts[sWindowName]:
|
||||
|
@ -35,7 +35,7 @@ def option(lang, opt):
|
||||
|
||||
# filtering affix fields (ds, is, ts etc.)
|
||||
def onlymorph(st):
|
||||
if st != None:
|
||||
if st is not None:
|
||||
st = re.sub(r"^.*(st:|po:)", r"\\1", st) # keep last word part
|
||||
st = re.sub(r"\\b(?=[dit][sp]:)","@", st) # and its affixes
|
||||
st = re.sub(r"(?<!@)\\b\w\w:\w+","", st).replace('@','').strip()
|
||||
@ -140,9 +140,9 @@ def wordmin(s, n):
|
||||
def calc(funcname, par):
|
||||
global calcfunc
|
||||
global SMGR
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
calcfunc = SMGR.createInstance( "com.sun.star.sheet.FunctionAccess")
|
||||
if calcfunc == None:
|
||||
if calcfunc is None:
|
||||
return None
|
||||
return calcfunc.callFunction(funcname, par)
|
||||
|
||||
|
Reference in New Issue
Block a user