From 805929c9b261108fab7414f8766cc8a3e621611f Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 23 Dec 2014 00:33:49 -0600 Subject: [PATCH] don't log namespace declarations as dependencies --- wakatime/languages/dotnet.py | 2 +- wakatime/languages/jvm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wakatime/languages/dotnet.py b/wakatime/languages/dotnet.py index 24153f6..c8b493b 100644 --- a/wakatime/languages/dotnet.py +++ b/wakatime/languages/dotnet.py @@ -29,7 +29,7 @@ class CSharpParser(TokenParser): self._process_other(token, content) def _process_namespace(self, token, content): - if content != 'import': + if content != 'import' and content != 'package' and content != 'namespace': content = content.split('.') content = content[0] if len(content) == 1 else '.'.join(content[0:len(content)-1]) self.append(content, truncate=False) diff --git a/wakatime/languages/jvm.py b/wakatime/languages/jvm.py index f495c1c..4fb54fc 100644 --- a/wakatime/languages/jvm.py +++ b/wakatime/languages/jvm.py @@ -29,7 +29,7 @@ class JavaParser(TokenParser): self._process_other(token, content) def _process_namespace(self, token, content): - if content != 'import': + if content != 'import' and content != 'package' and content != 'namespace': content = content.split('.') content = content[0] if len(content) == 1 else '.'.join(content[0:len(content)-1]) self.append(content, truncate=False)