Skip to content

Commit 73e68fd

Browse files
isort → ruff (#9152)
1 parent d8e3fd2 commit 73e68fd

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ repos:
33
rev: v0.14.5
44
hooks:
55
- id: ruff-check
6-
- repo: https://github.com/pycqa/isort
7-
rev: 5.13.2
8-
hooks:
9-
- id: isort
10-
language_version: python3
116
- repo: https://github.com/psf/black-pre-commit-mirror
127
rev: 25.11.0
138
hooks:

distributed/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@
4646
from pickle import PickleBuffer
4747
from time import sleep
4848
from types import ModuleType
49-
from typing import TYPE_CHECKING
49+
from typing import TYPE_CHECKING, ClassVar, TypeVar, overload
5050
from typing import Any as AnyType
51-
from typing import ClassVar, TypeVar, overload
5251

5352
import psutil
5453
import tblib.pickling_support
@@ -67,9 +66,8 @@
6766
from tornado.ioloop import IOLoop
6867

6968
import dask
70-
from dask.utils import _deprecated
69+
from dask.utils import _deprecated, key_split
7170
from dask.utils import ensure_bytes as _ensure_bytes
72-
from dask.utils import key_split
7371
from dask.utils import parse_timedelta as _parse_timedelta
7472
from dask.widgets import get_template
7573

distributed/utils_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
InvalidTransition,
8181
SecedeEvent,
8282
StateMachineEvent,
83+
WorkerState,
8384
)
8485
from distributed.worker_state_machine import TaskState as WorkerTaskState
85-
from distributed.worker_state_machine import WorkerState
8686

8787
try:
8888
import dask.array # register config

distributed/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
context_meter_to_server_digest,
7676
error_message,
7777
pingpong,
78+
send_recv,
7879
)
7980
from distributed.core import rpc as RPCType
80-
from distributed.core import send_recv
8181
from distributed.diagnostics import nvml, rmm
8282
from distributed.diagnostics.plugin import WorkerPlugin, _get_plugin_name
8383
from distributed.diskutils import WorkSpace

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ line-length = 120
8080
extend-select = [
8181
"B",
8282
"TID",
83+
"I",
8384
"UP",
8485
]
8586
ignore = [
@@ -101,15 +102,11 @@ ignore = [
101102
"distributed/shuffle/tests/test_shuffle.py" = ["F601"]
102103
"distributed/utils.py" = ["F821"]
103104

104-
[tool.isort]
105-
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "DISTRIBUTED", "FIRSTPARTY", "LOCALFOLDER"]
106-
profile = "black"
107-
skip_gitignore = true
108-
force_to_top = ["true"]
109-
default_section = "THIRDPARTY"
110-
known_first_party = ["distributed"]
111-
known_distributed = ["dask", "zict"]
112-
add_imports = ["from __future__ import annotations"]
105+
[tool.ruff.lint.isort]
106+
section-order = ["future", "standard-library", "third-party", "distributed", "first-party", "local-folder"]
107+
108+
[tool.ruff.lint.isort.sections]
109+
"distributed" = ["dask", "zict"]
113110

114111
[tool.setuptools_scm]
115112
version_file = "distributed/_version.py"

0 commit comments

Comments
 (0)