Skip to content

Commit

Permalink
Add linting instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanleung committed Nov 8, 2024
1 parent 33a3206 commit 40377f2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions submodules/moragents_dockers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,51 @@ The `Delegator` will automatically:

1. **Ensure the `Delegator` can properly route requests** to the new agent.
2. **Test the agent's functionality** through the chat interface.
### 6. Code Quality & Linting
We use several tools to maintain code quality:
#### Python (Root & Agents)
1. **black** - Code formatting
2. **isort** - Import sorting
3. **flake8** - Style guide enforcement
#### Frontend
1. **eslint** - JavaScript/TypeScript linting
---
#### Installing & Running Linters
Linters will automatically run on staged files when you commit changes. You can also run them manually:
```bash
# In root directory
pip install -r requirements.txt
pre-commit install
# Run all pre-commit hooks on staged files
pre-commit run
# Run specific hooks on staged files
pre-commit run black
pre-commit run isort
pre-commit run flake8
pre-commit run mypy
# Run on specific files
pre-commit run --files path/to/file.py
# Run all hooks on all files (useful for initial setup)
pre-commit run --all-files
```
#### Skipping Hooks
In rare cases where you need to skip pre-commit hooks (not recommended):
```bash
git commit -m "message" --no-verify
```

0 comments on commit 40377f2

Please sign in to comment.