Skip to content

Commit ad0184e

Browse files
committed
Refactor package structure and update tests
- Updated the package name in pyproject.toml for the Cython extension to "tree_sitter_languages.core". - Added a new __init__.py file in the tests directory. - Removed "perl" from the LANGUAGES list in test_tree_sitter_languages.py. - Adjusted import statements in tree_sitter_languages/__init__.py to reflect the new package structure and defined __all__ for public API. These changes improve the organization and clarity of the package structure and tests.
1 parent 0be0da2 commit ad0184e

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ build-backend = "setuptools.build_meta"
3535
packages = ["tree_sitter_languages"]
3636
package-data = {"tree_sitter_languages" = ["languages.so", "languages.dll"]}
3737
ext-modules = [
38-
{name = "tree_sitter_languages", sources = ["tree_sitter_languages/core.pyx"]}
38+
{name = "tree_sitter_languages.core", sources = ["tree_sitter_languages/core.pyx"]}
3939
]
4040

4141
[tool.cython]

tests/__init__.py

Whitespace-only changes.

tests/test_tree_sitter_languages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"markdown",
3434
"objc",
3535
"ocaml",
36-
"perl",
3736
"php",
3837
"python",
3938
"ql",

tree_sitter_languages/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
Does not support tree-sitter v0.22.0 and above.
44
"""
55

6-
from .core import get_language, get_parser
6+
from tree_sitter_languages.core import get_language, get_parser
7+
8+
__all__ = ["get_language", "get_parser"]

0 commit comments

Comments
 (0)