summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2022-07-31 06:37:05 +0200
committerStefan Behnel <stefan_ml@behnel.de>2022-07-31 06:37:05 +0200
commita864f9b8830fb80a24abb0d82cd9a28289e532a5 (patch)
treedb9fd17a23025dea91bc7a967b2d47861e056297
parent84afe5550e619cc1b40e9909e4a35234841ad366 (diff)
downloadcython-a864f9b8830fb80a24abb0d82cd9a28289e532a5.tar.gz
Fix some code style issues: assert is not a function but a statement.
-rw-r--r--Cython/Compiler/ExprNodes.py2
-rw-r--r--tests/run/pure_py.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index 130c4f1c7..b2990fdf0 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -544,7 +544,7 @@ class ExprNode(Node):
if is_pythran_supported_node_or_none(self):
return to_pythran(self)
- assert(type_ is not None)
+ assert type_ is not None
return to_pythran(self, type_)
def is_c_result_required(self):
diff --git a/tests/run/pure_py.py b/tests/run/pure_py.py
index a8dc5b014..ae1f820d3 100644
--- a/tests/run/pure_py.py
+++ b/tests/run/pure_py.py
@@ -549,18 +549,18 @@ def empty_declare():
]
r2.is_integral = True
- assert( r2.is_integral == True )
+ assert r2.is_integral == True
r3.x = 12.3
- assert( r3.x == 12.3 )
+ assert r3.x == 12.3
#It generates a correct C code, but raises an exception when interpreted
if cython.compiled:
r4[0].is_integral = True
- assert( r4[0].is_integral == True )
+ assert r4[0].is_integral == True
r5[0] = 42
- assert ( r5[0] == 42 )
+ assert r5[0] == 42
return [i for i, x in enumerate(res) if not x]