Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: build failures with older cython 0.29 series #1232

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/zeroconf/_services/registry.py
Original file line number Diff line number Diff line change
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