Add stubs for tree-sitter-languages (#8548)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Akuli
2022-08-17 23:35:44 +03:00
committed by GitHub
parent 7bbe06c1b5
commit 0b28177268
4 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# No idea what this is, seems to be auto-generated
tree_sitter_languages.core.__test__
# Fails to import and is not supposed to be imported, but stubtest finds it somehow
tree_sitter_languages.languages

View File

@@ -0,0 +1,5 @@
version = "1.3.*"
requires = ["types-tree-sitter"]
[tool.stubtest]
ignore_missing_stub = false

View File

@@ -0,0 +1,7 @@
from .core import get_language as get_language, get_parser as get_parser
__version__: str
__title__: str
__author__: str
__license__: str
__copyright__: str

View File

@@ -0,0 +1,4 @@
from tree_sitter import Language, Parser
def get_language(language: str) -> Language: ...
def get_parser(language: str) -> Parser: ...