Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Use old style typing for casts
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus authored Dec 5, 2021
1 parent b7c4011 commit 3cc5201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
from dataclasses import dataclass
from datetime import timedelta
from typing import Callable, Dict, Optional, TypeVar, cast
from typing import Callable, Dict, Optional, Set, TypeVar, cast

import homeassistant.helpers.config_validation as cv
import nibeuplink
Expand Down Expand Up @@ -398,7 +398,7 @@ def add_parameter_subscriber(
def _remove():
del self._parameter_subscribers[sentinel]

parameters_clean = cast(set[ParameterId], (parameters - {None}))
parameters_clean = cast(Set[ParameterId], (parameters - {None}))

self._parameter_subscribers[sentinel] = parameters_clean
for parameter in parameters_clean - set(self._parameters.keys()):
Expand Down

0 comments on commit 3cc5201

Please sign in to comment.