mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-17 17:24:03 +02:00
Fix _docs_helpers.py import error in CI
- Add try/except for relative vs absolute imports in _docs_helpers.py - Remove silent error handling in docs workflow (fail on error) The relative import fails when markdown-code-runner executes the code directly via sys.path.insert. The fallback to absolute import fixes this.
This commit is contained in:
parent
ee78670aa2
commit
edd2bad77b
2 changed files with 20 additions and 9 deletions
|
|
@ -5,14 +5,24 @@ import pandas as pd
|
|||
import voluptuous as vol
|
||||
from homeassistant.helpers import selector
|
||||
|
||||
from .const import (
|
||||
DOCS,
|
||||
DOCS_APPLY,
|
||||
DOCS_MANUAL_CONTROL,
|
||||
SET_MANUAL_CONTROL_SCHEMA,
|
||||
VALIDATION_TUPLES,
|
||||
apply_service_schema,
|
||||
)
|
||||
try:
|
||||
from .const import (
|
||||
DOCS,
|
||||
DOCS_APPLY,
|
||||
DOCS_MANUAL_CONTROL,
|
||||
SET_MANUAL_CONTROL_SCHEMA,
|
||||
VALIDATION_TUPLES,
|
||||
apply_service_schema,
|
||||
)
|
||||
except ImportError:
|
||||
from const import (
|
||||
DOCS,
|
||||
DOCS_APPLY,
|
||||
DOCS_MANUAL_CONTROL,
|
||||
SET_MANUAL_CONTROL_SCHEMA,
|
||||
VALIDATION_TUPLES,
|
||||
apply_service_schema,
|
||||
)
|
||||
|
||||
|
||||
def _format_voluptuous_instance(instance: vol.All) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue