move import to top of file. remove unused imports.

This commit is contained in:
Alan Hamlett 2015-02-23 22:20:27 -08:00
parent 308187b2ed
commit e4fe604a93

View File

@ -17,8 +17,8 @@ import platform
import sys import sys
import time import time
import threading import threading
import uuid import webbrowser
from os.path import expanduser, dirname, basename, realpath, isfile, join, exists from os.path import expanduser, dirname, basename, realpath, join, exists
# globals # globals
ACTION_FREQUENCY = 2 ACTION_FREQUENCY = 2
@ -44,7 +44,8 @@ from wakatime import parseConfigFile
try: try:
import ssl import ssl
import socket import socket
socket.ssl assert ssl
assert socket.ssl
HAS_SSL = True HAS_SSL = True
except (ImportError, AttributeError): except (ImportError, AttributeError):
from subprocess import Popen from subprocess import Popen
@ -246,10 +247,8 @@ class WakatimeListener(sublime_plugin.EventListener):
def on_modified(self, view): def on_modified(self, view):
handle_action(view) handle_action(view)
import webbrowser
class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand): class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand):
def run(self): def run(self):
webbrowser.open_new_tab('https://wakatime.com/dashboard') webbrowser.open_new_tab('https://wakatime.com/dashboard')