Skip to content

Commit d4cfc38

Browse files
committed
mypy
1 parent 005a1ca commit d4cfc38

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

zeroconf/_services/info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def addresses(self, value: List[bytes]) -> None:
180180
addr = ipaddress.ip_address(address)
181181
except ValueError:
182182
raise TypeError(
183-
'Addresses must either be IPv4 or IPv6 strings, bytes, or integers;'
184-
f' got {address}. Hint: convert string addresses with socket.inet_pton'
183+
"Addresses must either be IPv4 or IPv6 strings, bytes, or integers;"
184+
f" got %s. Hint: convert string addresses with socket.inet_pton" # type: ignore
185185
)
186186
if addr.version == 4:
187187
self._ipv4_addresses.append(addr)
@@ -444,7 +444,7 @@ def load_from_cache(self, zc: 'Zeroconf') -> bool:
444444
@property
445445
def _is_complete(self) -> bool:
446446
"""The ServiceInfo has all expected properties."""
447-
return self.text is not None and (self._ipv4_addresses or self._ipv6_addresses)
447+
return bool(self.text is not None and (self._ipv4_addresses or self._ipv6_addresses))
448448

449449
def request(
450450
self, zc: 'Zeroconf', timeout: float, question_type: Optional[DNSQuestionType] = None

0 commit comments

Comments
 (0)