-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
113 lines (100 loc) · 3 KB
/
Copy pathpyproject.toml
File metadata and controls
113 lines (100 loc) · 3 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
102
103
104
105
106
107
108
109
110
111
112
113
[project]
name = "st-error-boundary"
version = "0.1.8"
description = "A tiny, typed error-boundary decorator for Streamlit apps (UI-safe fallback + pluggable hooks)"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [{ name = "K-dash" }]
keywords = ["streamlit", "error-boundary", "error-handling", "decorator"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"streamlit>=1.50",
]
[project.urls]
Homepage = "https://github.com/K-dash/st-error-boundary"
Repository = "https://github.com/K-dash/st-error-boundary"
[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/st_error_boundary"]
# Include py.typed for PEP 561 support (type checkers will recognize this package)
include = ["src/st_error_boundary/py.typed"]
[tool.ruff]
target-version = "py312"
line-length = 120
extend-exclude = ["dist", ".venv"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D203", # one-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
"COM812", # Trailing comma missing (conflicts with formatter)
"ISC001", # Implicit string concatenation (conflicts with formatter)
"TC003", # Move stdlib import into TYPE_CHECKING block (too strict for runtime protocols)
"SIM105", # Use contextlib.suppress (explicit try-except is clearer here)
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "ANN", "D", "INP001"] # Allow assert, skip annotations, docstrings, and implicit namespace in tests
"examples/*" = ["D", "INP001", "T201"] # Skip docstrings, implicit namespace, and print in examples
"main.py" = ["D", "T201"] # Skip docstrings and print in main.py
[tool.mypy]
python_version = "3.13"
strict = true
warn_unreachable = true
warn_unused_ignores = true
mypy_path = ["src"]
[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.13"
venvPath = "."
include = ["src", "tests", "examples"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--strict-config",
]
[tool.coverage.run]
source = ["src/st_error_boundary"]
branch = true
omit = [
"*/tests/*",
"*/examples/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError",
"@abstractmethod",
"\\.\\.\\.",
]
show_missing = true
precision = 2
[tool.coverage.xml]
output = "coverage.xml"
[dependency-groups]
dev = [
"mypy>=1.18.2",
"pyright>=1.1.406",
"pytest>=8.4.2",
"ruff>=0.14.0",
"pytest-cov>=7.0.0,<8",
"pre-commit>=4.0.0",
]