Skip to content

Commit

Permalink
refactor: tidy codes
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
  • Loading branch information
jfcherng committed May 29, 2024
1 parent f2409e0 commit 311d0c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions boot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations


def reload_plugin() -> None:
import sys

Expand Down
12 changes: 0 additions & 12 deletions plugin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,8 @@ def expand(region: sublime.Region) -> sublime.Region:

@overload
def view_last_typing_timestamp_val(view: sublime.View) -> float: ...


@overload
def view_last_typing_timestamp_val(view: sublime.View, timestamp_s: float) -> None: ...


def view_last_typing_timestamp_val(view: sublime.View, timestamp_s: float | None = None) -> float | None:
"""
@brief Set/Get the last timestamp (in sec) when "OUIB_uri_regions" is updated
Expand Down Expand Up @@ -177,12 +173,8 @@ def view_is_dirty_val(view: sublime.View, is_dirty: bool | None = None) -> bool

@overload
def region_shift(region: sublime.Region, shift: int) -> sublime.Region: ...


@overload
def region_shift(region: int | list[int] | tuple[int, int], shift: int) -> tuple[int, int]: ...


def region_shift(region: RegionLike, shift: int) -> tuple[int, int] | sublime.Region:
"""
@brief Shift the region by given amount.
Expand All @@ -206,15 +198,11 @@ def region_expand(
region: sublime.Region,
expansion: int | list[int] | tuple[int, int],
) -> sublime.Region: ...


@overload
def region_expand(
region: int | list[int] | tuple[int, int],
expansion: int | list[int] | tuple[int, int],
) -> tuple[int, int]: ...


def region_expand(
region: RegionLike,
expansion: int | list[int] | tuple[int, int],
Expand Down

0 comments on commit 311d0c0

Please sign in to comment.