Replace isort with ruff
This commit is contained in:
@@ -6,16 +6,21 @@ from collections import deque
|
||||
from contextlib import suppress
|
||||
from time import monotonic
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
TYPE_CHECKING, Any, Callable, ContextManager, Deque, Dict, NamedTuple,
|
||||
Optional, Sequence, Type, Union, cast
|
||||
)
|
||||
from typing import TYPE_CHECKING, Any, Callable, ContextManager, Deque, Dict, NamedTuple, Optional, Sequence, Type, Union, cast
|
||||
|
||||
from kitty.types import DecoratedFunc, ParsedShortcut
|
||||
from kitty.typing import (
|
||||
AbstractEventLoop, BossType, Debug, ImageManagerType, KeyActionType,
|
||||
KeyEventType, LoopType, MouseButton, MouseEvent, ScreenSize,
|
||||
TermManagerType
|
||||
AbstractEventLoop,
|
||||
BossType,
|
||||
Debug,
|
||||
ImageManagerType,
|
||||
KeyActionType,
|
||||
KeyEventType,
|
||||
LoopType,
|
||||
MouseButton,
|
||||
MouseEvent,
|
||||
ScreenSize,
|
||||
TermManagerType,
|
||||
)
|
||||
|
||||
from .operations import MouseTracking, pending_update
|
||||
|
||||
@@ -9,17 +9,11 @@ from collections import defaultdict, deque
|
||||
from contextlib import suppress
|
||||
from enum import IntEnum
|
||||
from itertools import count
|
||||
from typing import (
|
||||
Any, Callable, ClassVar, DefaultDict, Deque, Dict, Generic, Iterator, List,
|
||||
Optional, Sequence, Tuple, Type, TypeVar, Union, cast
|
||||
)
|
||||
from typing import Any, Callable, ClassVar, DefaultDict, Deque, Dict, Generic, Iterator, List, Optional, Sequence, Tuple, Type, TypeVar, Union, cast
|
||||
|
||||
from kitty.conf.utils import positive_float, positive_int
|
||||
from kitty.fast_data_types import create_canvas
|
||||
from kitty.typing import (
|
||||
GRT_C, CompletedProcess, GRT_a, GRT_d, GRT_f, GRT_m, GRT_o, GRT_t,
|
||||
HandlerType
|
||||
)
|
||||
from kitty.typing import GRT_C, CompletedProcess, GRT_a, GRT_d, GRT_f, GRT_m, GRT_o, GRT_t, HandlerType
|
||||
from kitty.utils import ScreenSize, fit_image, which
|
||||
|
||||
from .operations import cursor
|
||||
|
||||
@@ -6,9 +6,7 @@ from typing import Callable, Tuple
|
||||
from kitty.fast_data_types import truncate_point_for_length, wcswidth
|
||||
from kitty.key_encoding import EventType, KeyEvent
|
||||
|
||||
from .operations import (
|
||||
RESTORE_CURSOR, SAVE_CURSOR, move_cursor_by, set_cursor_shape
|
||||
)
|
||||
from .operations import RESTORE_CURSOR, SAVE_CURSOR, move_cursor_by, set_cursor_shape
|
||||
|
||||
|
||||
class LineEdit:
|
||||
|
||||
@@ -16,17 +16,10 @@ from functools import partial
|
||||
from typing import Any, Callable, Dict, Generator, List, NamedTuple, Optional
|
||||
|
||||
from kitty.constants import is_macos
|
||||
from kitty.fast_data_types import (
|
||||
FILE_TRANSFER_CODE, close_tty, normal_tty, open_tty,
|
||||
parse_input_from_terminal, raw_tty
|
||||
)
|
||||
from kitty.key_encoding import (
|
||||
ALT, CTRL, SHIFT, backspace_key, decode_key_event, enter_key
|
||||
)
|
||||
from kitty.fast_data_types import FILE_TRANSFER_CODE, close_tty, normal_tty, open_tty, parse_input_from_terminal, raw_tty
|
||||
from kitty.key_encoding import ALT, CTRL, SHIFT, backspace_key, decode_key_event, enter_key
|
||||
from kitty.typing import ImageManagerType, KeyEventType, Protocol
|
||||
from kitty.utils import (
|
||||
ScreenSize, ScreenSizeGetter, screen_size_function, write_all
|
||||
)
|
||||
from kitty.utils import ScreenSize, ScreenSizeGetter, screen_size_function, write_all
|
||||
|
||||
from .handler import Handler
|
||||
from .operations import MouseTracking, init_state, reset_state
|
||||
|
||||
@@ -9,9 +9,7 @@ from typing import IO, Any, Callable, Dict, Generator, Optional, TypeVar, Union
|
||||
|
||||
from kitty.fast_data_types import Color
|
||||
from kitty.rgb import color_as_sharp, to_color
|
||||
from kitty.typing import (
|
||||
GraphicsCommandType, HandlerType, ScreenSize, UnderlineLiteral
|
||||
)
|
||||
from kitty.typing import GraphicsCommandType, HandlerType, ScreenSize, UnderlineLiteral
|
||||
|
||||
from .operations_stub import CMD
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from .operations import styled, repeat
|
||||
from .operations import repeat, styled
|
||||
|
||||
|
||||
def render_progress_bar(frac: float, width: int = 80) -> str:
|
||||
|
||||
Reference in New Issue
Block a user