summaryrefslogtreecommitdiff
path: root/en
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-07-13 09:52:54 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-07-22 22:51:14 +0200
commit95ad46565d8b72a66bff7201b14040f031e8c615 (patch)
treeffbbb300f1a3b043b7d688f06acc14913749992c /en
parentfc2dc383a40e56c0118866c9110954bebc6ea41d (diff)
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>
Diffstat (limited to 'en')
-rw-r--r--en/pythonpath/lightproof_handler_en.py4
-rw-r--r--en/pythonpath/lightproof_impl_en.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/en/pythonpath/lightproof_handler_en.py b/en/pythonpath/lightproof_handler_en.py
index 190abd0..8d2150f 100644
--- a/en/pythonpath/lightproof_handler_en.py
+++ b/en/pythonpath/lightproof_handler_en.py
@@ -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]:
diff --git a/en/pythonpath/lightproof_impl_en.py b/en/pythonpath/lightproof_impl_en.py
index 9f4729b..e9c7588 100644
--- a/en/pythonpath/lightproof_impl_en.py
+++ b/en/pythonpath/lightproof_impl_en.py
@@ -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)