mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-02-16 03:13:08 +08:00
21 lines
525 B
Markdown
21 lines
525 B
Markdown
|
|
---
|
||
|
|
description: "Python hooks: black/ruff auto-format, mypy/pyright type checking, print() warnings"
|
||
|
|
globs: ["**/*.py"]
|
||
|
|
alwaysApply: false
|
||
|
|
---
|
||
|
|
|
||
|
|
# Python Hooks
|
||
|
|
|
||
|
|
> This file extends [common/hooks.md](../common/hooks.md) with Python specific content.
|
||
|
|
|
||
|
|
## PostToolUse Hooks
|
||
|
|
|
||
|
|
Configure in `~/.claude/settings.json`:
|
||
|
|
|
||
|
|
- **black/ruff**: Auto-format `.py` files after edit
|
||
|
|
- **mypy/pyright**: Run type checking after editing `.py` files
|
||
|
|
|
||
|
|
## Warnings
|
||
|
|
|
||
|
|
- Warn about `print()` statements in edited files (use `logging` module instead)
|