Skip to content

Commit

Permalink
fix: build failures with older cython 0.29 series (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Aug 22, 2023
1 parent 8644173 commit 30c3ad9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/zeroconf/_services/registry.py
Expand Up @@ -25,6 +25,8 @@
from .._exceptions import ServiceNameAlreadyRegistered
from .info import ServiceInfo

_str = str


class ServiceRegistry:
"""A registry to keep track of services.
Expand Down Expand Up @@ -76,7 +78,7 @@ def async_get_infos_server(self, server: str) -> List[ServiceInfo]:
"""Return all ServiceInfo matching server."""
return self._async_get_by_index(self.servers, server)

def _async_get_by_index(self, records: Dict[str, List], key: str) -> List[ServiceInfo]:
def _async_get_by_index(self, records: Dict[str, List], key: _str) -> List[ServiceInfo]:
"""Return all ServiceInfo matching the index."""
record_list = records.get(key)
if record_list is None:
Expand Down

0 comments on commit 30c3ad9

Please sign in to comment.