mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +00:00
Small improvement to Copilot instructions (#6011)
This commit is contained in:
parent
cbc48c381f
commit
7873c457d5
5
.github/copilot-instructions.md
vendored
5
.github/copilot-instructions.md
vendored
@ -251,8 +251,8 @@ async def backup_full(self, request: web.Request) -> dict[str, Any]:
|
|||||||
### Development Commands
|
### Development Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run tests with coverage
|
# Run tests, adjust paths as necessary
|
||||||
pytest tests/ --cov=supervisor --cov-report=term-missing
|
pytest -qsx tests/
|
||||||
|
|
||||||
# Linting and formatting
|
# Linting and formatting
|
||||||
ruff check supervisor/
|
ruff check supervisor/
|
||||||
@ -275,6 +275,7 @@ Always run the pre-commit hooks at the end of code editing.
|
|||||||
- Use `self.sys_run_in_executor()` for blocking operations
|
- Use `self.sys_run_in_executor()` for blocking operations
|
||||||
- Access Docker via `self.sys_docker` not direct Docker API
|
- Access Docker via `self.sys_docker` not direct Docker API
|
||||||
- Use constants from `const.py` instead of hardcoding
|
- Use constants from `const.py` instead of hardcoding
|
||||||
|
- Store types in (per-module) `const.py` (e.g. supervisor/store/const.py)
|
||||||
|
|
||||||
**❌ Avoid These Patterns**:
|
**❌ Avoid These Patterns**:
|
||||||
- Direct Docker API usage - use Supervisor's Docker manager
|
- Direct Docker API usage - use Supervisor's Docker manager
|
||||||
|
Loading…
x
Reference in New Issue
Block a user