From c07a8999754a7c2158e3d42190ec79a843454e6c Mon Sep 17 00:00:00 2001 From: Levi Govaerts Date: Thu, 19 Mar 2020 16:53:15 +0100 Subject: [PATCH] Missed a pylint issue --- jsonnet_docblock_parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonnet_docblock_parser/parser.py b/jsonnet_docblock_parser/parser.py index be624c2..737ee44 100644 --- a/jsonnet_docblock_parser/parser.py +++ b/jsonnet_docblock_parser/parser.py @@ -161,7 +161,7 @@ def parseFile(file: str): def _parse_code(text): pattern = re.findall(PATTERNS["code"], text) - return pattern[0] if len(pattern) > 0 else "" + return pattern[0] if pattern else "" def _is_part_of_docblock(line): pattern = re.compile(PATTERNS["docblock"]) # Look for /* * and /** and */