-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
103 lines (86 loc) · 2.46 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[project]
name = "textmate-grammar-python"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "textmate-grammar-python"
version = "0.6.1"
description = "A lexer and tokenizer for grammar files as defined by TextMate and used in VSCode, implemented in Python."
authors = ["Mark Shui Hu <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/watermarkhu/textmate-grammar-python"
documentation = "https://textmate-grammar-python.readthedocs.io"
keywords = ["textmate", "tokenization"]
packages = [{include = "textmate_grammar", from = "src"}]
[tool.rye]
managed = true
[tool.poetry.dependencies]
python = "^3.9"
onigurumacffi = "^1.3.0"
PyYAML = "^6.0.1"
charset-normalizer = "^3.3.2"
[tool.poetry.group.test.dependencies]
pytest = ">=7.3.1,<9.0.0"
pytest-icdiff = ">=0.8,<0.10"
tox = "^4.11.4"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.6.0"
mypy = "^1.10.0"
ruff = "^0.5.0"
types-pyyaml = "^6.0.12.12"
poetry-plugin-export = "^1.8.0"
poetry-bumpversion = "^0.3.2"
[tool.poetry.group.doc.dependencies]
sphinx = "^7.2.6"
sphinx-autodoc2 = "^0.5.0"
myst-parser = "^3.0.0"
furo = "^2024.1.29"
sphinxcontrib-mermaid = "^0.9.2"
[tool.poetry_bumpversion.file."src/textmate_grammar/__init__.py"]
[tool.poetry_bumpversion.file."docs/conf.py"]
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[tool.ruff]
include = ["pyproject.toml", "src/textmate_grammar/**/*.py"]
exclude = ["src/textmate_grammar/grammars/"]
line-length = 100
indent-width = 4
[tool.ruff.lint]
select = ["E", "F", "UP", "B", "SIM", "I"]
ignore = ["E111", "E114", "E117", "E501", "F401"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.mypy]
ignore_missing_imports = true
exclude = ["test/*", "docs/*", "example.py"]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
[testenv]
skip_install = true
allowlist_externals = poetry
commands =
poetry run pytest test/unit
[testenv:mypy]
skip_install = true
allowlist_externals = mypy
commands =
mypy .
[testenv:regression]
skip_install = true
allowlist_externals = poetry, bash, sudo
platform = linux
change_dir = {tox_root}/test/regression
commands_pre =
bash install.sh
commands =
poetry run pytest .
"""