patch 9.0.1234: the code style has to be checked manually
Problem: The code style has to be checked manually.
Solution: Add basic code style checks in a test. Fix or avoid uncovered
problems.
diff --git a/src/if_python3.c b/src/if_python3.c
index 270e1a9..240b88f 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1505,7 +1505,8 @@
{
long _idx = PyLong_AsLong(idx);
return BufferItem((BufferObject *)(self), _idx);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
@@ -1539,7 +1540,8 @@
return RBAsItem((BufferObject *)(self), n, val, 1,
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
NULL);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
@@ -1623,7 +1625,8 @@
{
long _idx = PyLong_AsLong(idx);
return RangeItem((RangeObject *)(self), _idx);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;