move import to top of file. remove unused imports.
This commit is contained in:
parent
308187b2ed
commit
e4fe604a93
1 changed files with 5 additions and 6 deletions
11
WakaTime.py
11
WakaTime.py
|
@ -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')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue