style: refactor codebase to adhere to PEP 8 formatting standards throughout all source files
This commit is contained in:
@@ -32,6 +32,8 @@ Built with [FastMCP](https://github.com/jlowin/fastmcp) and the [MCP Python SDK]
|
||||
- [Project Structure](#project-structure)
|
||||
- [Design Decisions](#design-decisions)
|
||||
- [CI/CD (Gitea Actions)](#cicd-gitea-actions)
|
||||
- [Development & Testing](#️-development--testing)
|
||||
- [Git Hooks](#git-hooks)
|
||||
- [Known Strava API Limitations](#known-strava-api-limitations)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
|
||||
@@ -226,6 +228,26 @@ docker buildx build --platform linux/amd64,linux/arm64 -t strava-mcp-server:test
|
||||
|
||||
---
|
||||
|
||||
### 5. Git Hooks
|
||||
|
||||
A `pre-commit` hook is provided to automatically run `ruff check` on staged Python files before every commit, catching linting errors before they enter the history.
|
||||
|
||||
The hook is stored in the repository under `scripts/hooks/` for easy installation.
|
||||
|
||||
**Install the hook:**
|
||||
```bash
|
||||
cp scripts/hooks/pre-commit .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
```
|
||||
|
||||
**Behaviour:**
|
||||
- ✅ Commit proceeds if `ruff check` passes on all staged `.py` files.
|
||||
- ❌ Commit is aborted if any linting errors are found.
|
||||
- 🔧 Auto-fix lint issues with `uv run ruff check --fix`.
|
||||
- ⚡ Bypass for emergencies: `git commit --no-verify`.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user