From 77c32590991db2b74f61e0e606252618ab660354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Tue, 5 Dec 2017 12:44:34 +0100 Subject: [PATCH] Remove unnecessary parentheses --- lib/source_code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/source_code.py b/lib/source_code.py index 9edef30..0b8867d 100644 --- a/lib/source_code.py +++ b/lib/source_code.py @@ -20,7 +20,7 @@ def get_source_code(func, strip_comments=False): if strip_comments: # TODO: less fragile way to do this (tokenizer sadly inserts whitespaces all around) comment_pattern = re.compile('^(\s.*)#.*$') - source = ''.join(( + source = ''.join( line for line in StringIO(source).readlines() if re.match(comment_pattern, line) is None - )) + ) return source