Skip to content

Commit

Permalink
👽 Remove ErrorQueryFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 15, 2024
1 parent 1730f26 commit d97af95
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions src/termux_language_server/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from tree_sitter import Node, Tree
from tree_sitter_lsp import UNI, Finder
from tree_sitter_lsp.finders import (
ErrorQueryFinder,
ErrorFinder,
QueryFinder,
SchemaFinder,
UnFixedOrderFinder,
Expand All @@ -28,28 +28,6 @@
from .utils import get_query, get_schema


@dataclass(init=False)
class ErrorBashFinder(ErrorQueryFinder):
r"""Errorbashfinder."""

def __init__(
self,
message: str = "{{uni.get_text()}}: error",
severity: DiagnosticSeverity = DiagnosticSeverity.Error,
) -> None:
r"""Init.
:param filetype:
:type filetype: str
:param message:
:type message: str
:param severity:
:type severity: DiagnosticSeverity
:rtype: None
"""
super().__init__("bash", message, severity)


@dataclass(init=False)
class BashFinder(SchemaFinder):
r"""Bashfinder."""
Expand Down Expand Up @@ -326,7 +304,7 @@ def __call__(self, uni: UNI) -> bool:
return self.is_csv(uni)

def get_document_links(
self, uri: str, tree: Tree, template: str
self, uri: str, tree: Tree, template: str = ""
) -> list[DocumentLink]:
r"""Get document links.
Expand Down Expand Up @@ -418,7 +396,7 @@ def __init__(


DIAGNOSTICS_FINDER_CLASSES = [
ErrorBashFinder,
ErrorFinder,
BashFinder,
UnsortedKeywordFinder,
UnsortedCSVFinder,
Expand Down

0 comments on commit d97af95

Please sign in to comment.