From 3745a93be4740f20e0e2b11c4b1db7f43acf33e4 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Sat, 26 Sep 2015 16:55:50 -0700 Subject: [PATCH] remove unused code --- wakatime/languages/python.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/wakatime/languages/python.py b/wakatime/languages/python.py index 8ac18e7..5a22c6d 100644 --- a/wakatime/languages/python.py +++ b/wakatime/languages/python.py @@ -29,8 +29,6 @@ class PythonParser(TokenParser): def _process_token(self, token, content): if self.partial(token) == 'Namespace': self._process_namespace(token, content) - elif self.partial(token) == 'Names': - self._process_name(token, content) elif self.partial(token) == 'Word': self._process_word(token, content) elif self.partial(token) == 'Operator': @@ -51,22 +49,6 @@ class PythonParser(TokenParser): else: self._process_import(token, content) - def _process_name(self, token, content): - if self.state is not None: - if self.nonpackage: - self.nonpackage = False - else: - if self.state == 'from': - self.append(content, truncate=True, truncate_to=1) - if 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) - elif self.state == 'import-2': - self.append(content, truncate=True, truncate_to=1) - else: - self.state = None - def _process_word(self, token, content): if self.state is not None: if self.nonpackage: