Skip to content

Commit

Permalink
👽 Adapt python-tree-sitter 0.23.0
Browse files Browse the repository at this point in the history
Fix #22
  • Loading branch information
Freed-Wu committed Oct 4, 2024
1 parent 5fe8b6a commit 66db21b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.3
rev: 3.0.3
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
Expand All @@ -51,7 +51,7 @@ repos:
exclude_types:
- zsh
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.2
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
Expand All @@ -73,22 +73,22 @@ repos:
- mdformat-config
- mdformat-web
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
rev: v0.14.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
- markdown-it-texmath
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
rev: v3.9.0-1
hooks:
- id: shfmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.4
rev: v0.6.7
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.372
rev: v1.1.381
hooks:
- id: pyright

Expand Down
5 changes: 2 additions & 3 deletions src/termux_language_server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

SCHEMAS = {}
QUERIES = {}
language = Language(get_language_ptr())
parser = Parser()
parser.set_language(language)
parser.language = Language(get_language_ptr())


def get_query(name: str, filetype: str = "bash") -> Query:
Expand All @@ -37,7 +36,7 @@ def get_query(name: str, filetype: str = "bash") -> Query:
)
) as f:
text = f.read()
QUERIES[name] = language.query(text)
QUERIES[name] = parser.language.query(text)
return QUERIES[name]


Expand Down

0 comments on commit 66db21b

Please sign in to comment.