From fedceb25ff9098714ad15cbca4d0e49f244ac2b0 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sun, 7 Jun 2020 19:01:29 +0200 Subject: [PATCH] move the binary operator "or" to before the newline --- sphinx/ext/napoleon/docstring.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 9bd714f60..a50a695ee 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -858,10 +858,10 @@ def _token_type(token): if token.startswith(" ") or token.endswith(" "): type_ = "delimiter" elif ( - token.isnumeric() - or (token.startswith("{") and token.endswith("}")) - or (token.startswith('"') and token.endswith('"')) - or (token.startswith("'") and token.endswith("'")) + token.isnumeric() or + (token.startswith("{") and token.endswith("}")) or + (token.startswith('"') and token.endswith('"')) or + (token.startswith("'") and token.endswith("'")) ): type_ = "literal" elif token.startswith("{"):