Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .claude/ralph-loop.local.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
active: true
iteration: 1
max_iterations: 0
completion_promise: null
started_at: "2026-02-21T14:23:50Z"
---

run gourmand --full until we have 0 violations, and a very limited number of exceptions
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ wheels/

# Virtual environments
.venv

# Gourmand AI
.gourmand-cache/

# Git worktrees
.worktrees/
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: ruff-check
name: ruff check
entry: ruff check --fix
language: system
files: \.py$
stages: [pre-commit, pre-merge-commit]
43 changes: 43 additions & 0 deletions gourmand-exceptions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Gourmand Exceptions
#
# This file documents code quality exceptions that are justified
# for this project. Each exception should include:
# - Rule being excepted
# - Location (file/function)
# - Justification explaining why the code is correct as-is

[[exception]]
rule = "copy_paste_detection"
location = "src/mcp_google_sheets/server.py"
description = "Duplicate code cluster in batch operation functions"
justification = """
Functions that perform batch operations (share_spreadsheet, etc.) follow
the same pattern of iterating through lists and handling per-item errors.
This is the standard error handling pattern for batch operations where:
- Each item can succeed or fail independently
- Partial success is acceptable
- All errors must be reported back to the user

The pattern is:
```python
successes = []
failures = []
for item in items:
try:
# specific operation for this batch type
successes.append(result)
except Exception as e:
failures.append(error_details)
return {"successes": successes, "failures": failures}
```

This is idiomatic for batch operations. The operations within the loop are
domain-specific (sharing permissions, creating sheets, etc.) and cannot be
easily abstracted without losing clarity. Extracting a generic "batch processor"
would require passing operation logic as parameters, making the code harder to
understand and maintain.

This pattern appears in multiple functions because batch operations are a
common requirement when working with Google APIs, and this is the correct
way to handle them.
"""
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ fallback-version = "0.0.0"

[project.scripts]
mcp-google-sheets = "mcp_google_sheets:main"

[tool.ruff.lint]
select = ["PLR", "C901"]

[tool.ruff.lint.pylint]
max-branches = 10
max-statements = 50
Loading