docs: update references from old linting tools to Ruff
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -7,13 +7,11 @@ applyTo: "app/**/*.py"
|
||||
These instructions apply to all Python code in the `app/` directory.
|
||||
|
||||
## Code Style
|
||||
- Use **Black** formatter with 120 character line length
|
||||
- Use **isort** with Black profile for import organization
|
||||
- Follow **flake8** rules (ignore E203, W503 as per `.pre-commit-config.yaml`)
|
||||
- Use **Ruff** for linting and formatting with 120 character line length
|
||||
- All functions must have type hints for parameters and return values
|
||||
- Use `from typing import Optional, Dict, List, Any, Union` as needed
|
||||
|
||||
## Import Order (isort with Black profile)
|
||||
## Import Order (Ruff enforces isort-compatible ordering)
|
||||
```python
|
||||
# Standard library imports
|
||||
import os
|
||||
|
||||
+4
-4
@@ -75,7 +75,7 @@ DocuElevate/
|
||||
|
||||
#### Python Style
|
||||
```python
|
||||
# Use Black formatting (line length: 120)
|
||||
# Use Ruff formatting (line length: 120)
|
||||
# Use type hints
|
||||
def process_document(file_path: str, metadata: Dict[str, Any]) -> DocumentMetadata:
|
||||
"""
|
||||
@@ -681,17 +681,17 @@ DocuElevate uses `python-semantic-release` for automated version management.
|
||||
|
||||
Before submitting code:
|
||||
|
||||
- [ ] Code follows style guide (Black formatted)
|
||||
- [ ] Code follows style guide (Ruff formatted)
|
||||
- [ ] Commit messages use conventional commit format
|
||||
- [ ] All tests pass (`pytest`)
|
||||
- [ ] New code has tests
|
||||
- [ ] Coverage doesn't decrease
|
||||
- [ ] Documentation updated if needed
|
||||
- [ ] No secrets or credentials in code
|
||||
- [ ] Linting passes (`flake8`, `pylint`)
|
||||
- [ ] Linting passes (`ruff check`)
|
||||
- [ ] Type hints added (`mypy` clean)
|
||||
- [ ] No manual edits to `VERSION` or `CHANGELOG.md`
|
||||
- [ ] Security scan passed (`bandit`)
|
||||
- [ ] Security scan passed (included in `ruff check`)
|
||||
|
||||
Run full check:
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user