mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-13 14:44:28 -04:00
Add more type hints
This commit is contained in:
parent
ad0d065b03
commit
9eb99f283b
30 changed files with 392 additions and 243 deletions
|
@ -7,7 +7,7 @@ from pyhon.helper import str_to_float
|
|||
class HonAttribute:
|
||||
_LOCK_TIMEOUT: Final = 10
|
||||
|
||||
def __init__(self, data):
|
||||
def __init__(self, data: Dict[str, str] | str):
|
||||
self._value: str = ""
|
||||
self._last_update: Optional[datetime] = None
|
||||
self._lock_timestamp: Optional[datetime] = None
|
||||
|
@ -22,7 +22,7 @@ class HonAttribute:
|
|||
return self._value
|
||||
|
||||
@value.setter
|
||||
def value(self, value) -> None:
|
||||
def value(self, value: str) -> None:
|
||||
self._value = value
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue