my.bluemaestro: make config construction lazy
following the discussions here: https://github.com/karlicoss/HPI/issues/46#issuecomment-2295464073
This commit is contained in:
parent
9f017fb29b
commit
660d2d9fe9
2 changed files with 38 additions and 21 deletions
|
@ -1,19 +1,15 @@
|
|||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Iterator, Any
|
||||
from typing import Iterator
|
||||
|
||||
from more_itertools import one
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from my.bluemaestro import Measurement
|
||||
else:
|
||||
Measurement = Any
|
||||
from my.bluemaestro import measurements, Measurement
|
||||
|
||||
|
||||
def ok_measurements() -> Iterator[Measurement]:
|
||||
from my.bluemaestro import measurements
|
||||
for m in measurements():
|
||||
assert not isinstance(m, Exception)
|
||||
yield m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue