@@ -25,6 +25,8 @@
|
25 | 25 | from .._exceptions import ServiceNameAlreadyRegistered |
26 | 26 | from .info import ServiceInfo |
27 | 27 | |
| 28 | +_str = str |
| 29 | + |
28 | 30 | |
29 | 31 | class ServiceRegistry: |
30 | 32 | """A registry to keep track of services. |
@@ -76,7 +78,7 @@ def async_get_infos_server(self, server: str) -> List[ServiceInfo]:
|
76 | 78 | """Return all ServiceInfo matching server.""" |
77 | 79 | return self._async_get_by_index(self.servers, server) |
78 | 80 | |
79 | | -def _async_get_by_index(self, records: Dict[str, List], key: str) -> List[ServiceInfo]: |
| 81 | +def _async_get_by_index(self, records: Dict[str, List], key: _str) -> List[ServiceInfo]: |
80 | 82 | """Return all ServiceInfo matching the index.""" |
81 | 83 | record_list = records.get(key) |
82 | 84 | if record_list is None: |
|