Skip to content

Commit

Permalink
👽 Adapt to python-tree-sitter 0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Oct 4, 2024
1 parent b01608f commit d54297f
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 @@ -27,7 +27,7 @@ repos:
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -39,15 +39,15 @@ 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
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/rhysd/actionlint
rev: v1.7.0
rev: v1.7.2
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
Expand All @@ -69,18 +69,18 @@ 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/astral-sh/ruff-pre-commit
rev: v0.4.4
rev: v0.6.7
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.362
rev: v1.1.381
hooks:
- id: pyright

Expand Down
5 changes: 2 additions & 3 deletions src/mutt_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: FILETYPE = "neomuttrc") -> Query:
Expand All @@ -37,7 +36,7 @@ def get_query(name: str, filetype: FILETYPE = "neomuttrc") -> 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 d54297f

Please sign in to comment.