From 39dae1b2e6dac9eea707a08b4359932b2cb1b3bb Mon Sep 17 00:00:00 2001
From: Xavier Thompson <xavier.thompson@nexedi.com>
Date: Wed, 19 Aug 2020 00:12:31 +0200
Subject: [PATCH] Fix coding style errors

---
 Cython/Compiler/CypclassTransforms.py | 4 ++--
 Cython/Compiler/ModuleNode.py         | 2 +-
 Cython/Compiler/Symtab.py             | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Cython/Compiler/CypclassTransforms.py b/Cython/Compiler/CypclassTransforms.py
index bcc357d00..f3fc31a0c 100644
--- a/Cython/Compiler/CypclassTransforms.py
+++ b/Cython/Compiler/CypclassTransforms.py
@@ -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):
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 2a053d07b..77be9c308 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -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):
diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
index 6aff2ffad..9fd56e806 100644
--- a/Cython/Compiler/Symtab.py
+++ b/Cython/Compiler/Symtab.py
@@ -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):
-- 
2.30.9