Commit be89b89b authored by overkill's avatar overkill
parent 7aaafe17
Pipeline #167617 passed with stage
in 3 minutes and 49 seconds
......@@ -66,7 +66,7 @@ def get_trace_info(num_back_frames=0):
try:
for i in range(num_back_frames):
back_frame = frame.f_back
if back_frame == None:
if back_frame is None:
break
frame = back_frame
......
......@@ -310,11 +310,11 @@ class Manager(GObject.Object):
t1 = model.get_value(iter1, self.TOOL_COLUMN)
t2 = model.get_value(iter2, self.TOOL_COLUMN)
if model.iter_parent(iter1) == None:
if t1 == None:
if model.iter_parent(iter1) is None:
if t1 is None:
return -1
if t2 == None:
if t2 is None:
return 1
def lang_name(lang):
......@@ -769,8 +769,8 @@ class Manager(GObject.Object):
def get_cell_data_cb(self, column, cell, model, piter, user_data=None):
tool = model.get_value(piter, self.TOOL_COLUMN)
if tool == None or not isinstance(tool, Tool):
if tool == None:
if tool is None or not isinstance(tool, Tool):
if tool is None:
label = _('All Languages')
elif not isinstance(tool, GtkSource.Language):
label = _('Plain Text')
......
......@@ -127,7 +127,7 @@ class PythonConsole(Gtk.ScrolledWindow):
except:
pass
if font_desc == None:
if font_desc is None:
try:
font_desc = Pango.FontDescription(self.DEFAULT_FONT)
except:
......
......@@ -116,7 +116,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
def update_language(self):
lang = self.view.get_buffer().get_language()
if lang == None and self.language_id == None:
if lang is None and self.language_id is None:
return
elif lang and lang.get_id() == self.language_id:
return
......@@ -232,7 +232,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
# Find the current placeholder
if piter.compare(begin) >= 0 and \
piter.compare(end) <= 0 and \
current == None:
current is None:
currentIndex = index
current = placeholder
......
......@@ -68,7 +68,7 @@ class SnippetData:
self.init_snippet_data(node)
def init_snippet_data(self, node):
if node == None:
if node is None:
return
self.override = node.attrib.get('override')
......@@ -551,7 +551,7 @@ class SnippetsUserFile(SnippetsSystemFile):
return None
def new_snippet(self, properties=None):
if (not self.ok) or self.root == None:
if (not self.ok) or self.root is None:
return None
element = et.SubElement(self.root, 'snippet')
......@@ -609,7 +609,7 @@ class SnippetsUserFile(SnippetsSystemFile):
Library().remove_library(self)
def save(self):
if not self.ok or self.root == None or not self.tainted:
if not self.ok or self.root is None or not self.tainted:
return
path = os.path.dirname(self.path)
......
......@@ -380,7 +380,7 @@ class PlaceholderExpand(Placeholder):
if tabstop == 0:
continue
if self.mirror_text[tabstop] == None:
if self.mirror_text[tabstop] is None:
return False
return self.run_update()
......@@ -428,7 +428,7 @@ class PlaceholderShell(PlaceholderExpand):
self.set_text(str.join('', self.shell_output).rstrip('\n'))
if self.default == None:
if self.default is None:
self.default = self.get_text()
self.leave()
......@@ -615,7 +615,7 @@ class PlaceholderEval(PlaceholderExpand):
return False
if result == None:
if result is None:
# sys.stderr.write("%s:\n>> %s\n" % (_('The following python code, run in a snippet, does not return a value'), "\n>> ".join(self.command.split("\n"))))
result = ''
......
......@@ -178,17 +178,17 @@ class SubstitutionParser:
tokens = self._remains(tokens, 2)
condition, tokens = self._condition_value(tokens)
if condition == None or self._peek(tokens) != ',':
if condition is None or self._peek(tokens) != ',':
raise ParseError
truepart, tokens = self._parse(self._remains(tokens), ',')
if truepart == None:
if truepart is None:
raise ParseError
falsepart, tokens = self._parse(tokens, ')')
if falsepart == None:
if falsepart is None:
raise ParseError
if condition:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment