Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (115 loc) · 3.15 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (115 loc) · 3.15 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
123
124
125
126
127
128
129
130
131
132
133
[project]
name = "watchkeeper"
version = "0.0.0"
description = "A lightweight service monitoring tool that generates static status pages"
readme = "README.md"
authors = [{ name = "Sarp User" }]
license = { text = "MIT" }
classifiers = ["License :: OSI Approved :: MIT License"]
requires-python = ">=3.11"
dependencies = []
[project.urls]
"Homepage" = "https://github.com/sarpuser/watchkeeper"
"Bug Tracker" = "https://github.com/sarpuser/watchkeeper/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"bandit>=1.8.3",
"mypy>=1.15.0",
"pytest>=8.3.5",
"pytest-cov>=6.0.0",
"ruff>=0.11.2",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-rA --tb=line"
[tool.ruff]
# Target version
target-version = "py311"
extend-exclude = ["__init__.py"]
# Line length
line-length = 88
[tool.ruff.lint]
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Enable required linting rules
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"I", # isort
"C90", # McCabe complexity
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"RUF", # Ruff-specific rules
"PYI", # stub files
"PGH", # pygrep-hooks including type annotation issues
"N", # Naming conventions
"T20", # Print statements
]
# Directory-specific overrides
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"C901",
"E501",
"T20",
] # Ignore complexity and line length checks in test files
# Mccabe complexity settings
[tool.ruff.lint.mccabe]
max-complexity = 10
# Google docstring convention
[tool.ruff.lint.pydocstyle]
convention = "google"
# Import sorting settings
[tool.ruff.lint.isort]
known-first-party = ["pkg"]
combine-as-imports = true
# Enforce type annotations
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
suppress-none-returning = true
# Format settings - use tabs and double quotes
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
line-ending = "auto"
# Don't reformat docstrings
docstring-code-format = false
# mypy configuration for strong typing
[tool.mypy]
packages = ["watchkeeper"]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
strict_optional = false
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
implicit_reexport = false
strict_equality = true
exclude = ["build/.*", "dist/.*", "\\.eggs/.*", ".*\\.egg-info/.*", "tests/.*"]
[tool.bumpversion]
current_version = "0.3.3"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = ""