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.
|
These instructions apply to all Python code in the `app/` directory.
|
||||||
|
|
||||||
## Code Style
|
## Code Style
|
||||||
- Use **Black** formatter with 120 character line length
|
- Use **Ruff** for linting and formatting 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`)
|
|
||||||
- All functions must have type hints for parameters and return values
|
- All functions must have type hints for parameters and return values
|
||||||
- Use `from typing import Optional, Dict, List, Any, Union` as needed
|
- 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
|
```python
|
||||||
# Standard library imports
|
# Standard library imports
|
||||||
import os
|
import os
|
||||||
|
|||||||
+4
-4
@@ -75,7 +75,7 @@ DocuElevate/
|
|||||||
|
|
||||||
#### Python Style
|
#### Python Style
|
||||||
```python
|
```python
|
||||||
# Use Black formatting (line length: 120)
|
# Use Ruff formatting (line length: 120)
|
||||||
# Use type hints
|
# Use type hints
|
||||||
def process_document(file_path: str, metadata: Dict[str, Any]) -> DocumentMetadata:
|
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:
|
Before submitting code:
|
||||||
|
|
||||||
- [ ] Code follows style guide (Black formatted)
|
- [ ] Code follows style guide (Ruff formatted)
|
||||||
- [ ] Commit messages use conventional commit format
|
- [ ] Commit messages use conventional commit format
|
||||||
- [ ] All tests pass (`pytest`)
|
- [ ] All tests pass (`pytest`)
|
||||||
- [ ] New code has tests
|
- [ ] New code has tests
|
||||||
- [ ] Coverage doesn't decrease
|
- [ ] Coverage doesn't decrease
|
||||||
- [ ] Documentation updated if needed
|
- [ ] Documentation updated if needed
|
||||||
- [ ] No secrets or credentials in code
|
- [ ] No secrets or credentials in code
|
||||||
- [ ] Linting passes (`flake8`, `pylint`)
|
- [ ] Linting passes (`ruff check`)
|
||||||
- [ ] Type hints added (`mypy` clean)
|
- [ ] Type hints added (`mypy` clean)
|
||||||
- [ ] No manual edits to `VERSION` or `CHANGELOG.md`
|
- [ ] No manual edits to `VERSION` or `CHANGELOG.md`
|
||||||
- [ ] Security scan passed (`bandit`)
|
- [ ] Security scan passed (included in `ruff check`)
|
||||||
|
|
||||||
Run full check:
|
Run full check:
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user