From 814513ba9ffb1c0c1678b33757e263393b3c12d2 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sun, 17 Nov 2019 17:04:34 +0100 Subject: Replace `a and b or c` by the more legible `b if a or c`. --- sphinx/directives/other.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sphinx/directives') diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 1113e8241..a5a2831d6 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -300,7 +300,7 @@ class HList(SphinxDirective): index = 0 newnode = addnodes.hlist() for column in range(ncolumns): - endindex = index + (column < nmore and (npercol + 1) or npercol) + endindex = index + ((npercol + 1) if column < nmore else npercol) bullet_list = nodes.bullet_list() bullet_list += fulllist.children[index:endindex] newnode += addnodes.hlistcol('', bullet_list) -- cgit v1.2.3