prevent logging __future__ python dependency

This commit is contained in:
Alan Hamlett 2016-08-31 17:30:49 +02:00
parent 694205ebee
commit 3dd5e12d06
3 changed files with 8 additions and 8 deletions

View file

@ -20,6 +20,7 @@ class PythonParser(TokenParser):
r'^os$',
r'^sys$',
r'^sys\.',
r'^__future__$',
]
def parse(self):
@ -72,8 +73,6 @@ class PythonParser(TokenParser):
if self.state == 'from':
self.append(content, truncate=True, truncate_to=1)
self.state = 'from-2'
elif self.state == 'from-2' and content != 'import':
self.append(content, truncate=True, truncate_to=1)
elif self.state == 'import':
self.append(content, truncate=True, truncate_to=1)
self.state = 'import-2'