Skip to content

Commit

Permalink
refactor: remove some unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Feb 22, 2021
1 parent 403345a commit fc57ac3
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 26 deletions.
2 changes: 0 additions & 2 deletions st3/lsp_utils/_client_handler/abstract_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
from LSP.plugin import register_plugin
from LSP.plugin import Request
from LSP.plugin import Response
from LSP.plugin import Session
from LSP.plugin import unregister_plugin
from LSP.plugin import WorkspaceFolder
from LSP.plugin.core.rpc import method2attr
from LSP.plugin.core.typing import Any, Callable, Dict, List, Optional, Tuple, TypedDict
import sublime
import weakref

__all__ = ['ClientHandler']

Expand Down
1 change: 0 additions & 1 deletion st3/lsp_utils/_client_handler/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from ..server_resource_interface import ServerResourceInterface
from abc import ABCMeta
from abc import abstractmethod
from abc import abstractproperty
from LSP.plugin import ClientConfig
from LSP.plugin import DottedDict
from LSP.plugin import WorkspaceFolder
Expand Down
3 changes: 1 addition & 2 deletions st3/lsp_utils/_client_handler/language_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
from .api_decorator import register_decorated_handlers
from .interface import ClientHandlerInterface
from LSP.plugin import ClientConfig
from LSP.plugin import DottedDict
from LSP.plugin import LanguageHandler
from LSP.plugin import Notification
from LSP.plugin import read_client_config
from LSP.plugin import Request
from LSP.plugin import Response
from LSP.plugin import WorkspaceFolder
from LSP.plugin.core.typing import Any, Callable, Dict, Optional
from LSP.plugin.core.typing import Any, Callable, Dict
import sublime

__all__ = ['ClientHandler']
Expand Down
19 changes: 3 additions & 16 deletions st3/lsp_utils/activity_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ class ActivityIndicator:

_target = None # type: Optional[StatusTarget]

def __init__(
self,
target: Union[StatusTarget, sublime.View, sublime.Window],
label: Optional[str] = None,
) -> None:
def __init__(self, target: Union[StatusTarget, sublime.View, sublime.Window], label: Optional[str] = None) -> None:
self._label = label

if isinstance(target, sublime.View):
Expand All @@ -85,12 +81,7 @@ def __del__(self) -> None:
def __enter__(self) -> None:
self.start()

def __exit__(
self,
exc_type: type,
exc_value: Exception,
traceback: TracebackType
) -> None:
def __exit__(self, exc_type: type, exc_value: Exception, traceback: TracebackType) -> None:
self.stop()

def start(self) -> None:
Expand Down Expand Up @@ -142,8 +133,4 @@ def _render(self, ticks: int) -> str:
before = min(status, (2 * self.width) - status)
after = self.width - before

return "{}[{}={}]".format(
self._label + ' ' if self._label else '',
" " * before,
" " * after,
)
return "{}[{}={}]".format(self._label + ' ' if self._label else '', " " * before, " " * after)
2 changes: 1 addition & 1 deletion st3/lsp_utils/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from LSP.plugin.core.typing import Any, Callable, List, Optional, Tuple, Union
from LSP.plugin.core.typing import Any, Callable, List, Optional, Tuple
import re
import sublime
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion st3/lsp_utils/pip_client_handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .generic_client_handler import GenericClientHandler
from .server_pip_resource import ServerPipResource
from .server_resource_interface import ServerResourceInterface
from LSP.plugin.core.typing import Any, Optional
from LSP.plugin.core.typing import Optional

__all__ = ['PipClientHandler']

Expand Down
2 changes: 1 addition & 1 deletion st3/lsp_utils/server_pip_resource.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .helpers import run_command_sync
from .server_resource_interface import ServerResourceInterface
from .server_resource_interface import ServerStatus
from LSP.plugin.core.typing import Dict, List, Optional, Tuple
from LSP.plugin.core.typing import List, Optional, Tuple
from sublime_lib import ResourcePath
import os
import shutil
Expand Down
2 changes: 0 additions & 2 deletions st3/lsp_utils/server_resource_interface.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from .helpers import SemanticVersion
from abc import ABCMeta
from abc import abstractmethod
from abc import abstractproperty
from LSP.plugin.core.typing import Dict

__all__ = ['ServerStatus', 'ServerResourceInterface']

Expand Down

0 comments on commit fc57ac3

Please sign in to comment.