Update typing 09 (#48059)

This commit is contained in:
Marc Mueller 2021-03-18 10:02:00 +01:00 committed by GitHub
parent 2ab640aaef
commit 283b4abe67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 239 additions and 196 deletions

View file

@ -1,6 +1,8 @@
"""Support for ISY994 fans."""
from __future__ import annotations
import math
from typing import Callable, Optional
from typing import Callable
from pyisy.constants import ISY_VALUE_UNKNOWN, PROTO_INSTEON
@ -43,7 +45,7 @@ class ISYFanEntity(ISYNodeEntity, FanEntity):
"""Representation of an ISY994 fan device."""
@property
def percentage(self) -> Optional[int]:
def percentage(self) -> int | None:
"""Return the current speed percentage."""
if self._node.status == ISY_VALUE_UNKNOWN:
return None
@ -97,7 +99,7 @@ class ISYFanProgramEntity(ISYProgramEntity, FanEntity):
"""Representation of an ISY994 fan program."""
@property
def percentage(self) -> Optional[int]:
def percentage(self) -> int | None:
"""Return the current speed percentage."""
if self._node.status == ISY_VALUE_UNKNOWN:
return None