Commit eb138d17 authored by Xavier Thompson's avatar Xavier Thompson

Fix coding style errors

parent 3ef95e06
......@@ -190,7 +190,7 @@ def NAME(ARGDECLS):
node_type = node.entry.type
for wrapped_base_type in node_type.iter_wrapped_base_types():
if not wrapped_base_type in self.synthesized:
if wrapped_base_type not in self.synthesized:
self.base_type_to_deferred[wrapped_base_type].append(lambda: self.synthesize_wrappers(node))
return
......@@ -704,7 +704,7 @@ class CypclassLockTransform(Visitor.EnvTransform):
return node
def visit_SimpleCallNode(self, node):
for i, arg in enumerate(node.args or ()): # provide an empty tuple fallback in case node.args is None
for i, arg in enumerate(node.args or ()): # provide an empty tuple fallback in case node.args is None
if arg.type.is_cyp_class:
node.args[i] = self.lockcheck_written_or_read(arg, reading=arg.type.is_const)
with self.accesscontext(reading=True):
......
......@@ -1285,7 +1285,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("}")
if num_optional_if > 0:
opt_arg_guard.putln("if (this->%s != NULL) {" % opt_arg_name)
code.putln("}") # The check for optional_args != NULL
code.putln("}") # The check for optional_args != NULL
else:
code.decrease_indent()
for _ in range(num_trylock):
......
......@@ -1531,9 +1531,9 @@ class ModuleScope(Scope):
ttype = self._cached_tuple_types[components]
except KeyError:
ttype = self._cached_tuple_types[components] = PyrexTypes.c_tuple_type(components)
namespace = self # declare the ctuple in the module scope
namespace = self # declare the ctuple in the module scope
else:
namespace = templated_namespace # declare the ctuple in the templated namespace instead
namespace = templated_namespace # declare the ctuple in the templated namespace instead
ttype = PyrexTypes.c_tuple_type(components)
ttype.templated_namespace = templated_namespace.parent_type
cname = ttype.cname
......@@ -2772,7 +2772,7 @@ class CppClassScope(Scope):
'__ge__': '>=',
'__call__':'()',
'__getitem__':'[]',
"__contains__":"__contains__" # not actually a c++ operator: will generate a normal function named "operator__contains__"
"__contains__":"__contains__" # not actually a c++ operator: will generate a normal function named "operator__contains__"
}
def __init__(self, name, outer_scope, templates=None):
......
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