Skip to content

Commit

Permalink
device: use Python 3.7 type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Mar 7, 2024
1 parent 9c2363d commit b163639
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/logitech_receiver/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from binascii import hexlify as _hexlify
from collections import namedtuple
from dataclasses import dataclass
from typing import Optional
from typing import Optional, Union

import yaml as _yaml

Expand Down Expand Up @@ -556,8 +556,8 @@ def __getattr__(self, k):
class Battery:
"""Information about the current state of a battery"""

level: Optional[NamedInt | int]
next_level: Optional[NamedInt | int]
level: Optional[Union[NamedInt, int]]
next_level: Optional[Union[NamedInt, int]]
status: Optional[NamedInt]
voltage: Optional[int]
light_level: Optional[int] = None # light level for devices with solaar recharging
Expand Down

0 comments on commit b163639

Please sign in to comment.