Skip to content

Commit

Permalink
Fix disappearing programs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Apr 16, 2023
1 parent 04f19c4 commit 411effd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyhon/parameter/program.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, TYPE_CHECKING
from typing import List, TYPE_CHECKING, Dict

from pyhon.parameter.enum import HonParameterEnum

Expand All @@ -13,7 +13,7 @@ def __init__(self, key: str, command: "HonCommand") -> None:
super().__init__(key, {})
self._command = command
self._value: str = command.program
self._values: List[str] = list(command.programs)
self._programs: Dict[str, "HonCommand"] = command.programs
self._typology: str = "enum"

@property
Expand All @@ -25,9 +25,9 @@ def value(self, value: str) -> None:
if value in self.values:
self._command.program = value
else:
raise ValueError(f"Allowed values {self._values}")
raise ValueError(f"Allowed values {self.values}")

@property
def values(self) -> List[str]:
values = [v for v in self._values if all(f not in v for f in self._FILTER)]
values = [v for v in self._programs if all(f not in v for f in self._FILTER)]
return sorted(values)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="pyhOn",
version="0.8.0b6",
version="0.8.0b7",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
Expand Down

0 comments on commit 411effd

Please sign in to comment.