File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,13 @@ repos:
6969 - mdformat-config
7070 - mdformat-web
7171 - repo : https://github.com/DavidAnson/markdownlint-cli2
72- rev : v0.18.1
72+ rev : v0.19.0
7373 hooks :
7474 - id : markdownlint-cli2
7575 additional_dependencies :
7676 - markdown-it-texmath
7777 - repo : https://github.com/astral-sh/ruff-pre-commit
78- rev : v0.14.4
78+ rev : v0.14.5
7979 hooks :
8080 - id : ruff-check
8181 - id : ruff-format
Original file line number Diff line number Diff line change 33"""
44
55from dataclasses import dataclass
6+ from typing import Self
67
78from lsp_tree_sitter import UNI
89from lsp_tree_sitter .schema import Trie
1920class TmuxTrie (Trie ):
2021 r"""Tmux Trie."""
2122
22- value : dict [str , "Trie" ] | list ["Trie" ] | str # type: ignore
23+ value : dict [str , Self ] | list [Self ] | str
2324
2425 @classmethod
25- def from_node (cls , node : Node , parent : "Trie | None" ) -> "Trie" :
26+ def from_node (cls , node : Node , parent : Self | None ) -> Self :
2627 r"""From node.
2728
2829 :param node:
2930 :type node: Node
3031 :param parent:
31- :type parent: Trie | None
32- :rtype: "Trie"
32+ :type parent: Self | None
33+ :rtype: Self
3334 """
3435 if node .type == "value" :
3536 return cls (UNI (node ).range , parent , UNI (node ).text .strip ("'\" " ))
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ def completions(params: CompletionParams) -> CompletionList:
180180 return get_completion_list_by_enum (
181181 text ,
182182 get_schema ()["properties" ]["set-option" ]["properties" ].get (
183- uni . node2text ( parent .children [- 2 ]) , {}
183+ parent .children [- 2 ]. text , {}
184184 ),
185185 )
186186 return CompletionList (False , [])
You can’t perform that action at this time.
0 commit comments