diff --git a/plugin/client.py b/plugin/client.py index f86ed04..76a8dd8 100644 --- a/plugin/client.py +++ b/plugin/client.py @@ -49,14 +49,7 @@ T_Callable, ) from .ui import ViewCompletionManager, ViewPanelCompletionManager, WindowConversationManager -from .utils import ( - all_views, - all_windows, - debounce, - find_view_by_id, - get_session_setting, - status_message, -) +from .utils import all_views, all_windows, debounce, find_view_by_id, get_session_setting, status_message from .version_manager import version_manager WindowId = int diff --git a/plugin/decorators.py b/plugin/decorators.py index 9578e63..6bce873 100644 --- a/plugin/decorators.py +++ b/plugin/decorators.py @@ -1,10 +1,10 @@ +from __future__ import annotations + from functools import wraps from typing import Any, Callable, cast from .types import T_Callable -from .utils import ( - is_active_view, -) +from .utils import is_active_view def must_be_active_view(*, failed_return: Any = None) -> Callable[[T_Callable], T_Callable]: diff --git a/plugin/types.py b/plugin/types.py index 0c3a9d3..a340bb8 100644 --- a/plugin/types.py +++ b/plugin/types.py @@ -1,10 +1,9 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Any, Callable, Literal, Tuple, TypedDict, TypeVar +from typing import Any, Callable, Literal, Tuple, TypeVar, TypedDict -from LSP.plugin.core.protocol import Position as LspPosition -from LSP.plugin.core.protocol import Range as LspRange +from LSP.plugin.core.protocol import Position as LspPosition, Range as LspRange from LSP.plugin.core.typing import StrEnum T_Callable = TypeVar("T_Callable", bound=Callable[..., Any]) diff --git a/plugin/utils.py b/plugin/utils.py index 90c66ca..6656b4a 100644 --- a/plugin/utils.py +++ b/plugin/utils.py @@ -14,7 +14,7 @@ from collections.abc import Callable, Generator, Iterable from functools import wraps from pathlib import Path -from typing import IO, Any, Mapping, Sequence, TypeVar, Union, cast +from typing import Any, IO, Mapping, Sequence, TypeVar, Union, cast import sublime from LSP.plugin.core.sessions import Session diff --git a/pyproject.toml b/pyproject.toml index 05d34af..5442d3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,3 +89,9 @@ select = [ "SIM", ] ignore = ["E203", "SIM102", "SIM108"] + +[tool.ruff.lint.isort] +case-sensitive = true +combine-as-imports = true +order-by-type = false +required-imports = ["from __future__ import annotations"]