chore: add pyproject.toml, ruff/pytest config, pre-commit hooks, dev deps

This commit is contained in:
AJ
2026-07-01 23:43:30 -04:00
parent f5749947e1
commit 5ec53b87bc
4 changed files with 82 additions and 0 deletions
+6
View File
@@ -5,6 +5,12 @@ __pycache__/
.venv/ .venv/
venv/ venv/
# Test / lint caches
.pytest_cache/
.ruff_cache/
.coverage
htmlcov/
# PyInstaller / build # PyInstaller / build
build/ build/
dist/ dist/
+15
View File
@@ -0,0 +1,15 @@
# Install once with: pip install pre-commit && pre-commit install
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
+57
View File
@@ -0,0 +1,57 @@
[project]
name = "better-claude-config"
version = "1.1.0"
description = "Cross-platform GUI for editing the mcpServers block of Claude Desktop and Claude Code configs"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
dependencies = [
"PySide6>=6.6",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"ruff>=0.6",
"pre-commit>=3.5",
]
build = [
"pyinstaller>=6.0",
"pillow>=10.0",
]
[project.urls]
Repository = "https://git.avezzano.io/the_og/better-claude-config"
# ---------------------------------------------------------------------------
# Tooling
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line length handled pragmatically; GUI strings run long
"SIM108", # ternary rewrites hurt readability in places
"RUF001", # UI strings intentionally use typographic glyphs (, →, ↳)
"RUF002",
"RUF003",
]
[tool.ruff.lint.per-file-ignores]
"bcc.py" = ["F405", "F403"] # Qt star-import style if ever used
+4
View File
@@ -4,3 +4,7 @@ PySide6>=6.6
# Build / packaging # Build / packaging
pyinstaller>=6.0 pyinstaller>=6.0
pillow>=10.0 # generates icons/app.ico during CI (Windows build) pillow>=10.0 # generates icons/app.ico during CI (Windows build)
# Test / lint
pytest>=8.0
ruff>=0.6