Remove unnecessary parentheses

This commit is contained in:
Bálint Bokros 2017-12-05 12:44:34 +01:00
parent 7479ef5639
commit 77c3259099

View File

@ -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