Skip to content

Commit

Permalink
feat: (basic) update changes in ST 4145
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
  • Loading branch information
jfcherng committed Dec 14, 2022
1 parent 6b9cd9c commit 2e2b97d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions format_stubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ for f in *.pyi; do
mv -- "$f" "${f%.pyi}.py"
done

black .
isort .
black . --preview
isort . --profile black

# rename *.py to *.pyi
for f in *.py; do
Expand Down
19 changes: 18 additions & 1 deletion typings/sublime.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,24 @@ def get_macro() -> List[CommandArgsDict]:
...


def project_history() -> List[str]:
"""
Returns paths of recently opened `.sublime-project` / `.sublime-workspace` files.
@version ST(>=4145)
"""
...


def folder_history() -> List[str]:
"""
Returns paths of recently opened folders.
@version ST(>=4145)
"""
...


class Window:
"""This class represents windows and provides an interface of methods to interact with them."""

Expand Down Expand Up @@ -2457,7 +2475,6 @@ class Buffer:


class Settings:

settings_id: int

def __init__(self, id: int) -> None:
Expand Down
7 changes: 4 additions & 3 deletions typings/sublime_plugin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,10 @@ class ListInputHandler(CommandInputHandler[T_InputType], Generic[T_InputType]):

def list_items(
self,
) -> List[str | Tuple[str, T_InputType] | sublime.ListInputItem[T_InputType]] | Tuple[
List[str | Tuple[str, T_InputType] | sublime.ListInputItem[T_InputType]], int
]:
) -> (
List[str | Tuple[str, T_InputType] | sublime.ListInputItem[T_InputType]]
| Tuple[List[str | Tuple[str, T_InputType] | sublime.ListInputItem[T_InputType]], int]
):
"""
The items to show in the list. If returning a list of `(str, value)` tuples,
then the str will be shown to the user, while the value will be used as the command argument.
Expand Down

0 comments on commit 2e2b97d

Please sign in to comment.