Skip to content

Commit 76e9c81

Browse files
refactor: consolidate find commands in clean target
- Replace three separate find commands with single consolidated command - Maintains same functionality for __pycache__ dirs and .pyc/.pyo files - Preserves error suppression behavior with 2>/dev/null || true - Improves efficiency by reducing directory traversals from 3 to 1
1 parent 69bd607 commit 76e9c81

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ VENV_PIP := .venv/bin/pip
77
clean:
88
@echo "Cleaning generated artifacts and virtual environment..."
99
@rm -rf dist/ build/ *.egg-info/ .coverage .pytest_cache/
10-
@find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
11-
@find . -name "*.pyc" -delete 2>/dev/null || true
12-
@find . -name "*.pyo" -delete 2>/dev/null || true
10+
@find . \( -type d -name "__pycache__" -exec rm -rf {} + \) -o \( -name "*.pyc" -o -name "*.pyo" \) -delete 2>/dev/null || true
1311
@rm -rf .venv
1412
@echo "Clean complete."
1513

0 commit comments

Comments
 (0)