-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (76 loc) · 2.1 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (76 loc) · 2.1 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/copilot_usage"]
exclude = ["src/copilot_usage/docs"]
[project]
name = "cli-tools"
version = "0.0.1"
description = "Python CLI tools monorepo"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pydantic>=2.13.2,<3",
"click>=8.3.2,<9",
"rich>=15.0.0,<16",
"loguru>=0.7.3,<1",
"watchdog>=6.0.0,<7",
]
[project.scripts]
copilot-usage = "copilot_usage.cli:main"
[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"pyright",
"ruff",
"bandit",
"diff-cover",
]
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"B", # flake8-bugbear (common bug patterns)
"C4", # flake8-comprehensions (unnecessary list/dict/set calls)
"SIM", # flake8-simplify (simplifiable code)
"I", # isort (import sorting)
"UP", # pyupgrade (modernize syntax to target-version)
"ICN", # flake8-import-conventions (import alias conventions)
"ISC", # flake8-implicit-str-concat (catches accidental string concat)
"RET", # flake8-return (unnecessary return/else patterns)
"S", # flake8-bandit (security — inline checks)
"PERF", # perflint (performance anti-patterns)
]
ignore = [
"E501", # line length — handled by ruff format
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S105", "S106"] # allow assert + hardcoded test credentials
[tool.ruff.lint.isort]
known-first-party = ["copilot_usage"]
combine-as-imports = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.12"
reportUnusedFunction = "warning"
[tool.pytest.ini_options]
testpaths = ["tests", "src"]
addopts = "-v --strict-markers --tb=short --doctest-modules"
[tool.coverage.run]
source = ["src/copilot_usage"]
branch = true
[tool.coverage.report]
fail_under = 80
show_missing = true
exclude_lines = [
"pragma: no cover",
]