-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
71 lines (64 loc) · 2.75 KB
/
pyproject.toml
File metadata and controls
71 lines (64 loc) · 2.75 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
# Root pyproject.toml - shared tool configuration only
# Packages are defined in packages/*/pyproject.toml
# This file provides pytest, ruff, bandit, and coverage configuration
[tool.pytest.ini_options]
# Include BRANCHES_*.py files for branch coverage tests (default is test_*.py and *_test.py)
python_files = ["test_*.py", "*_test.py", "BRANCHES_*.py"]
# Required for hypergumbo-tracker's Textual TUI tests (async pilot tests)
asyncio_mode = "auto"
# Tracker tests import a shared 'helpers' module from their tests/ directory
pythonpath = ["packages/hypergumbo-tracker/tests"]
# Filter expected warnings from tests
filterwarnings = [
# tree-sitter unavailability in fallback tests
"ignore:tree-sitter-.*not available:UserWarning",
"ignore:.*analysis skipped.*requires tree-sitter:UserWarning",
# tree-sitter deprecation warnings (older grammar packages)
"ignore:int argument support is deprecated:DeprecationWarning",
]
[tool.coverage.run]
# Omit optional modules that require extra dependencies
omit = [
"*/sketch_embeddings.py", # Requires sentence-transformers
"*/_embedding_data.py", # Generated embedding data
"*/__main__.py", # Entry point
]
[tool.coverage.report]
# Always show missing line numbers - avoids re-running pytest just to find them
show_missing = true
[tool.ruff]
target-version = "py310"
line-length = 100
src = ["packages/*/src", "packages/*/tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"S", # flake8-bandit (security rules)
"RUF", # ruff-specific rules
]
ignore = [
"E501", # Line too long (existing code has long lines)
"S101", # Use of assert (fine for tests and internal checks)
"S105", # Hardcoded password (false positives on PASS_ID, etc.)
"S106", # Hardcoded password (false positives)
"S110", # Try-except-pass (sometimes valid pattern)
"RUF059", # Unused unpacked variable (intentional _var pattern)
"RUF005", # Collection literal concatenation (stylistic, low priority)
"B028", # No explicit stacklevel (TODO: fix in future PR)
]
[tool.ruff.lint.per-file-ignores]
# Tests can use assert, hardcoded values, subprocess, temp paths, side-effect imports
"packages/*/tests/**/*.py" = ["S101", "S105", "S106", "S603", "S108", "E741", "F401", "F841", "RUF005"]
# Conditional imports for optional tree-sitter deps
"packages/*/src/**/*.py" = ["E402"]
[tool.bandit]
exclude_dirs = ["tests", ".venv"]
skips = [
"B101", # assert_used - fine for production code assertions
"B105", # hardcoded_password_string - false positives on PASS_ID, PASS_VERSION
"B110", # try_except_pass - intentional pattern for optional analyzers
]