From 60eadc9bade816abf09a2c83b781e0b2ddeffc3a Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Tue, 31 Dec 2024 15:47:15 +0800 Subject: [PATCH] :white_check_mark: Fix pytest really --- src/make_language_server/finders.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/make_language_server/finders.py b/src/make_language_server/finders.py index 9387e4e..75380d0 100644 --- a/src/make_language_server/finders.py +++ b/src/make_language_server/finders.py @@ -37,17 +37,20 @@ def __init__( query = get_query("include") super().__init__(query, message, severity) - def capture2uni(self, capture: tuple[Node, str], uri: str) -> UNI | None: + def capture2uni( + self, label: str, nodes: list[Node], uri: str + ) -> UNI | None: r"""Capture2uni. - :param capture: - :type capture: tuple[Node, str] + :param label: + :type label: str + :param nodes: + :type nodes: list[Node] :param uri: :type uri: str :rtype: UNI | None """ - node, label = capture - uni = UNI(uri, node) + uni = UNI(uri, nodes[0]) return ( uni if label == "path" and not os.path.isfile(uni.get_path())