-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (90 loc) · 3.01 KB
/
pyproject.toml
File metadata and controls
101 lines (90 loc) · 3.01 KB
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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "rosettes"
version = "0.2.0"
description = "Python syntax highlighter and Pygments alternative for secure code highlighting and existing CSS themes"
readme = "README.md"
requires-python = ">=3.14"
license = "MIT"
keywords = [
"syntax-highlighting",
"python-syntax-highlighter",
"lexer",
"free-threading",
"pygments",
"pygments-alternative",
"code-highlighting",
]
authors = [{ name = "Bengal Contributors" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup :: HTML",
"Typing :: Typed",
]
dependencies = [] # Pure Python, no runtime deps
[project.urls]
Homepage = "https://lbliii.github.io/rosettes/"
Documentation = "https://lbliii.github.io/rosettes/"
Repository = "https://github.com/lbliii/rosettes"
Issues = "https://github.com/lbliii/rosettes/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
rosettes = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = ["-ra", "-q", "--strict-markers"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"property: property-based tests (may take longer)",
]
[tool.ty.environment]
python-version = "3.14"
[tool.ty.src]
exclude = ["dist/", "build/"]
[tool.ruff]
target-version = "py314"
line-length = 100
[tool.ruff.lint]
# Enable Python upgrade rules and other quality checks
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (unused imports, variables, etc.)
"UP", # pyupgrade - Python modernization
"B", # flake8-bugbear - common bugs
"SIM", # flake8-simplify - simplify code
"I", # isort - import sorting
"PIE", # misc lints (unnecessary pass, duplicate dict keys, etc.)
"PERF", # perflint - performance anti-patterns
"C4", # unnecessary comprehensions/list()/dict() calls
"RUF", # Ruff-specific (unused noqa, mutable class defaults, etc.)
]
# Per-file ignore rules
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__ files
"tests/**/*.py" = ["S101"] # Allow assert in tests
"tests/fixtures/**/*.py" = [
"F821",
] # Fixtures are intentionally invalid code for lexer tests
[dependency-groups]
dev = [
"pytest>=9.0.2",
"pytest-cov>=6.0.0",
"pytest-timeout>=2.3.0", # Prevent hung tests
"ty>=0.0.11", # Astral type checker (Rust-based)
"ruff>=0.15.1", # 0.15.1+ fixes except-parenthesis bug (PEP 758 + as clause)
"pre-commit>=4.0.0", # For git hooks
"hypothesis>=6.100.0", # Property-based testing
]
# Documentation site (uses bengal from PyPI)
docs = ["bengal>=0.2.0"]