Skip to content

Commit

Permalink
👽 Adapt to python-tree-sitter 0.23.0
Browse files Browse the repository at this point in the history
Fix #11
  • Loading branch information
Freed-Wu committed Oct 4, 2024
1 parent 0373277 commit efc0635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
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.10
rev: v0.6.7
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/kumaraditya303/mirrors-pyright
rev: v1.1.368
rev: v1.1.381
hooks:
- id: pyright

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

Please sign in to comment.