Skip to content

Commit

Permalink
refactor: use more-itertools
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed May 12, 2024
1 parent e332ee1 commit 0c10e5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 40 deletions.
5 changes: 5 additions & 0 deletions plugin/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import annotations

assert __package__

PLUGIN_NAME = __package__.partition(".")[0]
7 changes: 3 additions & 4 deletions plugin/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

import sublime
import sublime_plugin
from more_itertools import first_true

from .constants import PLUGIN_NAME
from .libs.LnkParse3.extra.metadata import Metadata, SerializedPropertyStorage, SerializedPropertyValueIntegerName
from .libs.LnkParse3.lnk_file import LnkFile
from .utils import first_true

PACKAGE_NAME = __package__.partition(".")[0]


class FollowLnkViewEventListener(sublime_plugin.ViewEventListener):
Expand Down Expand Up @@ -42,7 +41,7 @@ def on_load(self) -> None:
self.view.close()
return

raise RuntimeError(f"[{PACKAGE_NAME}] Uh, what's this: {path = }; {target_path = }")
raise RuntimeError(f"[{PLUGIN_NAME}] Uh, what's this: {path = }; {target_path = }")

@classmethod
def _resolve_lnk(cls, path: str) -> str | None:
Expand Down
36 changes: 0 additions & 36 deletions plugin/utils.py

This file was deleted.

0 comments on commit 0c10e5e

Please sign in to comment.