From c99f1504747de4e7f2b62398c0caa86bffd14441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Mon, 8 Aug 2022 19:09:29 +0200 Subject: [PATCH] Fix flake8 reported errors in previous cherry-picked commit --- sphinx/writers/latex.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 8424ac5ce4c..cd565e362db 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -926,13 +926,18 @@ def visit_row(self, node: Element) -> None: self.table.col = 0 _colsep = '' if self.table.booktabs else '|' - if self.builder.config.latex_zebra_stripes and not isinstance(node.parent, nodes.thead): + if ( + self.builder.config.latex_zebra_stripes and + not isinstance(node.parent, nodes.thead) + ): if self.table.row % 2 == 0: self.body.append( - '\\rowcolor{RowEvenColor}[\\dimexpr\\tabcolsep+0.1pt\\relax]') + '\\rowcolor{RowEvenColor}[\\dimexpr\\tabcolsep+0.1pt\\relax]' + ) else: self.body.append( - '\\rowcolor{RowOddColor}[\\dimexpr\\tabcolsep+0.1pt\\relax]') + '\\rowcolor{RowOddColor}[\\dimexpr\\tabcolsep+0.1pt\\relax]' + ) # fill columns if the row starts with the bottom of multirow cell while True: