mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-12-22 18:55:32 +00:00
Fix path for #22
This commit is contained in:
parent
2a74000ff3
commit
29c936b045
|
@ -103,8 +103,10 @@ class Hon:
|
||||||
)
|
)
|
||||||
await self._create_appliance(appliance, self.api)
|
await self._create_appliance(appliance, self.api)
|
||||||
if (
|
if (
|
||||||
test_data := self._test_data_path / "hon-test-data" / "test_data"
|
self._test_data_path
|
||||||
).exists() or (test_data := test_data / "test_data").exists():
|
and (test_data := self._test_data_path / "hon-test-data" / "test_data").exists()
|
||||||
|
or (test_data := test_data / "..").exists()
|
||||||
|
):
|
||||||
api = TestAPI(test_data)
|
api = TestAPI(test_data)
|
||||||
for appliance in await api.load_appliances():
|
for appliance in await api.load_appliances():
|
||||||
await self._create_appliance(appliance, api)
|
await self._create_appliance(appliance, api)
|
||||||
|
|
|
@ -69,11 +69,9 @@ class HonParameterRange(HonParameter):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def values(self) -> List[str]:
|
def values(self) -> List[str]:
|
||||||
if isinstance(self.step, float):
|
|
||||||
result = []
|
result = []
|
||||||
i = self.min
|
i = self.min
|
||||||
while i <= self.max:
|
while i < self.max:
|
||||||
i += self.step
|
i += self.step
|
||||||
result.append(str(i))
|
result.append(str(i))
|
||||||
return result
|
return result
|
||||||
return [str(i) for i in range(int(self.min), int(self.max) + 1, int(self.step))]
|
|
||||||
|
|
Loading…
Reference in a new issue