@@ -106,14 +106,14 @@ def async_updates_from_response(self, msg: DNSIncoming) -> None:
106106 )
107107 record .set_created_ttl (record .created , _DNS_PTR_MIN_TTL )
108108
109- if record .unique : # https://tools.ietf.org/html/rfc6762#section-10.2
109+ if record .unique is True : # https://tools.ietf.org/html/rfc6762#section-10.2
110110 unique_types .add ((record .name , record_type , record .class_ ))
111111
112112 if TYPE_CHECKING :
113113 record = cast (_UniqueRecordsType , record )
114114
115115 maybe_entry = cache .async_get_unique (record )
116- if not record .is_expired (now_float ):
116+ if record .is_expired (now_float ) is False :
117117 if maybe_entry is not None :
118118 maybe_entry .reset_ttl (record )
119119 else :
@@ -129,7 +129,7 @@ def async_updates_from_response(self, msg: DNSIncoming) -> None:
129129 removes .add (record )
130130
131131 if unique_types :
132- cache .async_mark_unique_records_older_than_1s_to_expire (unique_types , answers , now )
132+ cache .async_mark_unique_records_older_than_1s_to_expire (unique_types , answers , now_float )
133133
134134 if updates :
135135 self .async_updates (now , updates )
@@ -151,7 +151,7 @@ def async_updates_from_response(self, msg: DNSIncoming) -> None:
151151 new = False
152152 if other_adds or address_adds :
153153 new = cache .async_add_records (address_adds )
154- if cache .async_add_records (other_adds ):
154+ if cache .async_add_records (other_adds ) is True :
155155 new = True
156156 # Removes are processed last since
157157 # ServiceInfo could generate an un-needed query
@@ -182,7 +182,6 @@ def async_add_listener(
182182 return
183183
184184 questions = [question ] if isinstance (question , DNSQuestion ) else question
185- assert self .zc .loop is not None
186185 self ._async_update_matching_records (listener , questions )
187186
188187 def _async_update_matching_records (
0 commit comments