diff options
Diffstat (limited to 'Cython/Compiler')
-rw-r--r-- | Cython/Compiler/Annotate.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/Buffer.py | 6 | ||||
-rw-r--r-- | Cython/Compiler/Code.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/ExprNodes.py | 4 | ||||
-rw-r--r-- | Cython/Compiler/FlowControl.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/Nodes.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/ParseTreeTransforms.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/Parsing.py | 4 | ||||
-rw-r--r-- | Cython/Compiler/Symtab.py | 2 |
10 files changed, 14 insertions, 14 deletions
diff --git a/Cython/Compiler/Annotate.py b/Cython/Compiler/Annotate.py index c79bd7f96..6e2d2a53b 100644 --- a/Cython/Compiler/Annotate.py +++ b/Cython/Compiler/Annotate.py @@ -294,7 +294,7 @@ class AnnotationCCodeWriter(CCodeWriter): # now the whole c-code if needed: if self.show_entire_c_code: outlist.append(u'<p><div class="cython">') - onclick_title = u"<pre class='cython line'{onclick}>+ {title}</pre>\n"; + onclick_title = u"<pre class='cython line'{onclick}>+ {title}</pre>\n" outlist.append(onclick_title.format( onclick=self._onclick_attr, title=AnnotationCCodeWriter.COMPLETE_CODE_TITLE, diff --git a/Cython/Compiler/Buffer.py b/Cython/Compiler/Buffer.py index 75aa7b0c0..79687163c 100644 --- a/Cython/Compiler/Buffer.py +++ b/Cython/Compiler/Buffer.py @@ -146,12 +146,12 @@ def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, nee options = {} for name, (value, pos) in dictargs.items(): - if not name in buffer_options: + if name not in buffer_options: raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) options[name] = value for name, (value, pos) in zip(buffer_options, posargs): - if not name in buffer_options: + if name not in buffer_options: raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) if name in options: raise CompileError(pos, ERR_BUF_DUP % name) @@ -159,7 +159,7 @@ def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, nee # Check that they are all there and copy defaults for name in buffer_options: - if not name in options: + if name not in options: try: options[name] = defaults[name] except KeyError: diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index a52269b12..6f507eb66 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -891,7 +891,7 @@ class FunctionState(object): """ return [(name, type) for name, type, manage_ref in self.temps_in_use() - if manage_ref and type.is_pyobject] + if manage_ref and type.is_pyobject] def all_managed_temps(self): """Return a list of (cname, type) tuples of refcount-managed Python objects. diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index dc2fd5f53..c39e0b18a 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -11330,8 +11330,8 @@ class NumBinopNode(BinopNode): def c_types_okay(self, type1, type2): #print "NumBinopNode.c_types_okay:", type1, type2 ### - return (type1.is_numeric or type1.is_enum) \ - and (type2.is_numeric or type2.is_enum) + return (type1.is_numeric or type1.is_enum) \ + and (type2.is_numeric or type2.is_enum) def generate_evaluation_code(self, code): if self.overflow_check: diff --git a/Cython/Compiler/FlowControl.py b/Cython/Compiler/FlowControl.py index 45ce2dd09..ec38ed164 100644 --- a/Cython/Compiler/FlowControl.py +++ b/Cython/Compiler/FlowControl.py @@ -455,7 +455,7 @@ class GVContext(object): start = min(block.positions) stop = max(block.positions) srcdescr = start[0] - if not srcdescr in self.sources: + if srcdescr not in self.sources: self.sources[srcdescr] = list(srcdescr.get_lines()) lines = self.sources[srcdescr] return '\\n'.join([l.strip() for l in lines[start[1] - 1:stop[1]]]) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index c9363d92e..1e1774d54 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -185,7 +185,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): h_vars = h_entries(env.var_entries) h_funcs = h_entries(env.cfunc_entries) h_extension_types = h_entries(env.c_class_entries) - if h_types or h_vars or h_funcs or h_extension_types: + if h_types or h_vars or h_funcs or h_extension_types: result.h_file = replace_suffix_encoded(result.c_file, ".h") h_code = Code.CCodeWriter() c_code_config = generate_c_code_config(env, options) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index c9bea7ca8..6e9428a05 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1052,7 +1052,7 @@ class CSimpleBaseTypeNode(CBaseTypeNode): self.arg_name = EncodedString(self.name) else: if self.templates: - if not self.name in self.templates: + if self.name not in self.templates: error(self.pos, "'%s' is not a type identifier" % self.name) type = PyrexTypes.TemplatePlaceholderType(self.name) else: diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index ae73801ab..7ccee4fb7 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -2539,7 +2539,7 @@ class AlignFunctionDefinitions(CythonTransform): return None node = node.as_cfunction(pxd_def) elif (self.scope.is_module_scope and self.directives['auto_cpdef'] - and not node.name in self.imported_names + and node.name not in self.imported_names and node.is_cdef_func_compatible()): # FIXME: cpdef-ing should be done in analyse_declarations() node = node.as_cfunction(scope=self.scope) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 99ae8a10e..466300c67 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -2654,7 +2654,7 @@ def p_memoryviewslice_access(s, base_type_node): return result def looking_at_name(s): - return s.sy == 'IDENT' and not s.systring in calling_convention_words + return s.sy == 'IDENT' and s.systring not in calling_convention_words def looking_at_expr(s): if s.systring in base_type_start_words: @@ -2914,7 +2914,7 @@ def p_c_simple_declarator(s, ctx, empty, is_type, cmethod_flag, fatal=False) name += op elif op == 'IDENT': - op = s.systring; + op = s.systring if op not in supported_overloaded_operators: s.error("Overloading operator '%s' not yet supported." % op, fatal=False) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 75ac72b0f..081b4ec23 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -1465,7 +1465,7 @@ class ModuleScope(Scope): # object type, and not declared with cdef, it will live # in the module dictionary, otherwise it will be a C # global variable. - if not visibility in ('private', 'public', 'extern'): + if visibility not in ('private', 'public', 'extern'): error(pos, "Module-level variable cannot be declared %s" % visibility) if not is_cdef: if type is unspecified_type: |