@@ -79,7 +79,7 @@ def _fast_init_entry(self, name: str, type_: _int, class_: _int) -> None:
79
79
self .class_ = class_ & _CLASS_MASK
80
80
self .unique = (class_ & _CLASS_UNIQUE ) != 0
81
81
82
- def _dns_entry_matches (self , other ) -> bool : # type: ignore[no-untyped-def]
82
+ def _dns_entry_matches (self , other : DNSEntry ) -> bool :
83
83
return self .key == other .key and self .type == other .type and self .class_ == other .class_
84
84
85
85
def __eq__ (self , other : Any ) -> bool :
@@ -135,7 +135,7 @@ def __eq__(self, other: Any) -> bool:
135
135
@property
136
136
def max_size (self ) -> int :
137
137
"""Maximum size of the question in the packet."""
138
- return len (self .name .encode ("utf-8" )) + _LEN_BYTE + _LEN_SHORT + _LEN_SHORT # type # class
138
+ return len (self .name .encode ("utf-8" )) + _LEN_BYTE + _LEN_SHORT + _LEN_SHORT
139
139
140
140
@property
141
141
def unicast (self ) -> bool :
@@ -199,7 +199,7 @@ def suppressed_by(self, msg: DNSIncoming) -> bool:
199
199
return True
200
200
return False
201
201
202
- def _suppressed_by_answer (self , other ) -> bool : # type: ignore[no-untyped-def]
202
+ def _suppressed_by_answer (self , other : DNSRecord ) -> bool :
203
203
"""Returns true if another record has same name, type and class,
204
204
and if its TTL is at least half of this record's."""
205
205
return self == other and other .ttl > (self .ttl / 2 )
@@ -285,7 +285,7 @@ def __eq__(self, other: Any) -> bool:
285
285
"""Tests equality on address"""
286
286
return isinstance (other , DNSAddress ) and self ._eq (other )
287
287
288
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
288
+ def _eq (self , other : DNSAddress ) -> bool :
289
289
return (
290
290
self .address == other .address
291
291
and self .scope_id == other .scope_id
@@ -344,7 +344,7 @@ def __eq__(self, other: Any) -> bool:
344
344
"""Tests equality on cpu and os."""
345
345
return isinstance (other , DNSHinfo ) and self ._eq (other )
346
346
347
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
347
+ def _eq (self , other : DNSHinfo ) -> bool :
348
348
"""Tests equality on cpu and os."""
349
349
return self .cpu == other .cpu and self .os == other .os and self ._dns_entry_matches (other )
350
350
@@ -399,7 +399,7 @@ def __eq__(self, other: Any) -> bool:
399
399
"""Tests equality on alias."""
400
400
return isinstance (other , DNSPointer ) and self ._eq (other )
401
401
402
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
402
+ def _eq (self , other : DNSPointer ) -> bool :
403
403
"""Tests equality on alias."""
404
404
return self .alias_key == other .alias_key and self ._dns_entry_matches (other )
405
405
@@ -447,7 +447,7 @@ def __eq__(self, other: Any) -> bool:
447
447
"""Tests equality on text."""
448
448
return isinstance (other , DNSText ) and self ._eq (other )
449
449
450
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
450
+ def _eq (self , other : DNSText ) -> bool :
451
451
"""Tests equality on text."""
452
452
return self .text == other .text and self ._dns_entry_matches (other )
453
453
@@ -510,7 +510,7 @@ def __eq__(self, other: Any) -> bool:
510
510
"""Tests equality on priority, weight, port and server"""
511
511
return isinstance (other , DNSService ) and self ._eq (other )
512
512
513
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
513
+ def _eq (self , other : DNSService ) -> bool :
514
514
"""Tests equality on priority, weight, port and server."""
515
515
return (
516
516
self .priority == other .priority
@@ -585,7 +585,7 @@ def __eq__(self, other: Any) -> bool:
585
585
"""Tests equality on next_name and rdtypes."""
586
586
return isinstance (other , DNSNsec ) and self ._eq (other )
587
587
588
- def _eq (self , other ) -> bool : # type: ignore[no-untyped-def]
588
+ def _eq (self , other : DNSNsec ) -> bool :
589
589
"""Tests equality on next_name and rdtypes."""
590
590
return (
591
591
self .next_name == other .next_name
0 commit comments