Skip to content

Commit 7fdb94d

Browse files
committed
update rules
1 parent fe8d0d2 commit 7fdb94d

7 files changed

Lines changed: 25 additions & 26 deletions

File tree

plugin/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

3+
from LSP.plugin import register_plugin, unregister_plugin
4+
35
from .client import LspTyPlugin
46
from .constants import SERVER_VERSION
57
from .version_manager import version_manager
6-
from LSP.plugin import register_plugin
7-
from LSP.plugin import unregister_plugin
88

99
__all__ = (
1010
# ST: core

plugin/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from __future__ import annotations
22

3+
from typing import Any
4+
5+
import sublime
6+
from LSP.plugin import AbstractPlugin, ClientConfig, DottedDict
7+
from typing_extensions import override
8+
39
from .constants import PACKAGE_NAME
410
from .log import log_warning
511
from .template import load_string_template
612
from .version_manager import version_manager
7-
from LSP.plugin import AbstractPlugin
8-
from LSP.plugin import ClientConfig
9-
from LSP.plugin import DottedDict
10-
from typing import Any
11-
from typing_extensions import override
12-
import sublime
1313

1414

1515
class LspTyPlugin(AbstractPlugin):

plugin/log.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from __future__ import annotations
22

3-
from .constants import PACKAGE_NAME
43
from typing import Any
4+
55
import sublime
66

7+
from .constants import PACKAGE_NAME
8+
79

810
def log_debug(message: str) -> None:
911
print(f"[{PACKAGE_NAME}][DEBUG] {message}")

plugin/template.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from __future__ import annotations
22

3-
from .constants import PACKAGE_NAME
43
from functools import lru_cache
4+
55
import jinja2
66
import sublime
77

8+
from .constants import PACKAGE_NAME
9+
810
JINJA_TEMPLATE_ENV = jinja2.Environment(
911
extensions=[
1012
"jinja2.ext.do",

plugin/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
from __future__ import annotations
22

3-
from collections.abc import Iterable
4-
from pathlib import Path
5-
from typing import Any
6-
from typing import IO
7-
from typing import Union
83
import gzip
94
import io
105
import os
@@ -13,6 +8,9 @@
138
import tarfile
149
import urllib.request
1510
import zipfile
11+
from collections.abc import Iterable
12+
from pathlib import Path
13+
from typing import Any, IO, Union
1614

1715
PathLike = Union[Path, str]
1816

plugin/version_manager.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
from __future__ import annotations
22

3-
from .constants import PACKAGE_NAME
4-
from .constants import PLATFORM_ARCH
5-
from .log import log_info
6-
from .utils import decompress_buffer
7-
from .utils import rmtree_ex
8-
from .utils import simple_urlopen
9-
from LSP.plugin import AbstractPlugin
103
import io
114
import pathlib
125

6+
from LSP.plugin import AbstractPlugin
7+
8+
from .constants import PACKAGE_NAME, PLATFORM_ARCH
9+
from .log import log_info
10+
from .utils import decompress_buffer, rmtree_ex, simple_urlopen
11+
1312

1413
class VersionManager:
1514
# https://github.com/astral-sh/ty

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ ignore = ["E203"]
7171
"boot.py" = ["E402"]
7272

7373
[tool.ruff.lint.isort]
74-
case-sensitive = false
75-
force-single-line = true
76-
from-first = true
77-
no-sections = true
74+
case-sensitive = true
75+
combine-as-imports = true
7876
order-by-type = false
7977
required-imports = ["from __future__ import annotations"]
8078

0 commit comments

Comments
 (0)