-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (111 loc) · 3.38 KB
/
Copy pathpyproject.toml
File metadata and controls
122 lines (111 loc) · 3.38 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
114
115
116
117
118
119
120
121
122
[project]
name = "slackblocks"
version = "2.1.1"
description = "Python wrapper for the Slack Blocks API"
authors = [
{ name = "Nicholas Lambourne", email = "dev@ndl.im" },
]
maintainers = [
{ name = "Nicholas Lambourne", email = "dev@ndl.im" },
]
license = { text = "MIT" }
readme = "README.md"
keywords = [
"slackblocks",
"slack",
"messaging",
"message generation",
"slack blocks",
"blocks",
]
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Typing :: Typed",
"Topic :: Communications :: Chat",
]
requires-python = ">=3.10"
[project.urls]
Homepage = "https://github.com/nicklambourne/slackblocks"
Repository = "https://github.com/nicklambourne/slackblocks"
Documentation = "https://nicklambourne.github.io/slackblocks/"
Changelog = "https://github.com/nicklambourne/slackblocks/blob/master/python/CHANGELOG.md"
[tool.hatch.build.targets.sdist]
exclude = ["test/**", "docs/**"]
[dependency-groups]
dev = [
"aiohttp>=3.10.11,<4.0.0",
"hypothesis>=6.100.0,<7.0.0",
"mypy>=1.14.1,<2.4.0",
"pytest>=8.3.4,<10.0.0",
"pytest-cov>=6.0.0,<8.0.0",
"ruff>=0.8.0,<1.0.0",
"slack-sdk>=3.33.4,<4.0.0",
"twine>=6.0.1,<8.0.0",
"wheel>=0.45.1,<1.0.0",
]
docs = [
"griffe>=2.1.0,<3.0.0",
]
[build-system]
requires = ["hatchling<1.33"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [".venv", "build", "dist", ".eggs", ".git"]
[tool.ruff.lint]
# Rule families enabled:
# E, W - pycodestyle
# F - pyflakes
# B - flake8-bugbear (likely bugs)
# I - isort (import sorting)
# SIM - flake8-simplify (simpler equivalents)
# TC - flake8-type-checking (move type-only imports into TYPE_CHECKING)
# UP - pyupgrade (modern syntax for the target Python version)
select = ["B", "E", "F", "I", "SIM", "TC", "UP", "W"]
# E501 (line-too-long) is handled by the formatter; don't lint it. Long lines
# in docstrings (e.g. Slack API URLs) can't be wrapped without breaking
# Markdown link rendering.
# SIM108 (force ternary) is opinionated and hurts readability for the
# multi-branch validation patterns used in this codebase.
ignore = ["E501", "SIM108"]
[tool.ruff.lint.per-file-ignores]
"slackblocks/__init__.py" = ["F401"]
"slackblocks/rich_text/__init__.py" = ["F401"]
"slackblocks/rich_text/objects.py" = ["W605"]
[tool.ruff.format]
# Black-compatible defaults; no overrides needed.
[tool.pytest.ini_options]
filterwarnings = [
"error",
]
addopts = [
"--cov=slackblocks",
"--cov-report=term-missing",
"--cov-fail-under=90",
]
[tool.coverage.run]
source = ["slackblocks"]
branch = true
[tool.coverage.report]
# Lines that don't need coverage:
# - 'pragma: no cover' opt-out marker.
# - Defensive 'raise NotImplementedError' stubs, which are intentionally
# unreachable without a future PR (see Phase 7.4 from_dict deferrals).
# - Lines that mypy needs but the runtime never hits.
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@overload",
"\\.\\.\\.$",
]
show_missing = true
skip_covered = false