@@ -223,9 +223,9 @@ async def udp(
223223 dtuple = None
224224 cm = await backend .make_socket (af , socket .SOCK_DGRAM , 0 , stuple , dtuple )
225225 async with cm as s :
226- await send_udp (s , wire , destination , expiration ) # pyright : ignore
226+ await send_udp (s , wire , destination , expiration ) # type : ignore
227227 (r , received_time , _ ) = await receive_udp (
228- s , # pyright : ignore
228+ s , # type : ignore
229229 destination ,
230230 expiration ,
231231 ignore_unexpected ,
@@ -428,9 +428,9 @@ async def tcp(
428428 af , socket .SOCK_STREAM , 0 , stuple , dtuple , timeout
429429 )
430430 async with cm as s :
431- await send_tcp (s , wire , expiration ) # pyright : ignore
431+ await send_tcp (s , wire , expiration ) # type : ignore
432432 (r , received_time ) = await receive_tcp (
433- s , # pyright : ignore
433+ s , # type : ignore
434434 expiration ,
435435 one_rr_per_rrset ,
436436 q .keyring ,
@@ -514,8 +514,8 @@ async def tls(
514514
515515
516516def _maybe_get_resolver (
517- resolver : Optional ["dns.asyncresolver.Resolver" ], # pyright : ignore
518- ) -> "dns.asyncresolver.Resolver" : # pyright : ignore
517+ resolver : Optional ["dns.asyncresolver.Resolver" ], # type : ignore
518+ ) -> "dns.asyncresolver.Resolver" : # type : ignore
519519 # We need a separate method for this to avoid overriding the global
520520 # variable "dns" with the as-yet undefined local variable "dns"
521521 # in https().
@@ -541,7 +541,7 @@ async def https(
541541 post : bool = True ,
542542 verify : bool | str | ssl .SSLContext = True ,
543543 bootstrap_address : str | None = None ,
544- resolver : Optional ["dns.asyncresolver.Resolver" ] = None , # pyright : ignore
544+ resolver : Optional ["dns.asyncresolver.Resolver" ] = None , # type : ignore
545545 family : int = socket .AF_UNSPEC ,
546546 http_version : HTTPVersion = HTTPVersion .DEFAULT ,
547547) -> dns .message .Message :
@@ -586,14 +586,14 @@ async def https(
586586 ):
587587 if bootstrap_address is None :
588588 resolver = _maybe_get_resolver (resolver )
589- assert parsed .hostname is not None # pyright : ignore
590- answers = await resolver .resolve_name ( # pyright : ignore
591- parsed .hostname , family # pyright : ignore
589+ assert parsed .hostname is not None # type : ignore
590+ answers = await resolver .resolve_name ( # type : ignore
591+ parsed .hostname , family # type : ignore
592592 )
593593 bootstrap_address = random .choice (list (answers .addresses ()))
594594 if client and not isinstance (
595595 client , dns .quic .AsyncQuicConnection
596- ): # pyright : ignore
596+ ): # type : ignore
597597 raise ValueError ("client parameter must be a dns.quic.AsyncQuicConnection." )
598598 assert client is None or isinstance (client , dns .quic .AsyncQuicConnection )
599599 return await _http3 (
@@ -614,7 +614,7 @@ async def https(
614614 if not have_doh :
615615 raise NoDOH # pragma: no cover
616616 # pylint: disable=possibly-used-before-assignment
617- if client and not isinstance (client , httpx .AsyncClient ): # pyright : ignore
617+ if client and not isinstance (client , httpx .AsyncClient ): # type : ignore
618618 raise ValueError ("client parameter must be an httpx.AsyncClient" )
619619 # pylint: enable=possibly-used-before-assignment
620620
@@ -647,7 +647,7 @@ async def https(
647647 family = family ,
648648 )
649649
650- cm = httpx .AsyncClient ( # pyright : ignore
650+ cm = httpx .AsyncClient ( # type : ignore
651651 http1 = h1 , http2 = h2 , verify = verify , transport = transport # type: ignore
652652 )
653653
@@ -662,7 +662,7 @@ async def https(
662662 }
663663 )
664664 response = await backend .wait_for (
665- the_client .post ( # pyright : ignore
665+ the_client .post ( # type : ignore
666666 url ,
667667 headers = headers ,
668668 content = wire ,
@@ -674,7 +674,7 @@ async def https(
674674 wire = base64 .urlsafe_b64encode (wire ).rstrip (b"=" )
675675 twire = wire .decode () # httpx does a repr() if we give it bytes
676676 response = await backend .wait_for (
677- the_client .get ( # pyright : ignore
677+ the_client .get ( # type : ignore
678678 url ,
679679 headers = headers ,
680680 params = {"dns" : twire },
@@ -743,11 +743,11 @@ async def _http3(
743743 if connection :
744744 the_connection = connection
745745 else :
746- the_connection = the_manager .connect ( # pyright : ignore
746+ the_connection = the_manager .connect ( # type : ignore
747747 where , port , source , source_port
748748 )
749749 (start , expiration ) = _compute_times (timeout )
750- stream = await the_connection .make_stream (timeout ) # pyright : ignore
750+ stream = await the_connection .make_stream (timeout ) # type : ignore
751751 async with stream :
752752 # note that send_h3() does not need await
753753 stream .send_h3 (url , wire , post )
@@ -815,11 +815,11 @@ async def quic(
815815 server_name = server_hostname ,
816816 ) as the_manager :
817817 if not connection :
818- the_connection = the_manager .connect ( # pyright : ignore
818+ the_connection = the_manager .connect ( # type : ignore
819819 where , port , source , source_port
820820 )
821821 (start , expiration ) = _compute_times (timeout )
822- stream = await the_connection .make_stream (timeout ) # pyright : ignore
822+ stream = await the_connection .make_stream (timeout ) # type : ignore
823823 async with stream :
824824 await stream .send (wire , True )
825825 wire = await stream .receive (_remaining (expiration ))
@@ -870,11 +870,11 @@ async def _inbound_xfr(
870870 mexpiration = expiration
871871 if is_udp :
872872 timeout = _timeout (mexpiration )
873- (rwire , _ ) = await udp_sock .recvfrom (65535 , timeout ) # pyright : ignore
873+ (rwire , _ ) = await udp_sock .recvfrom (65535 , timeout ) # type : ignore
874874 else :
875- ldata = await _read_exactly (tcp_sock , 2 , mexpiration ) # pyright : ignore
875+ ldata = await _read_exactly (tcp_sock , 2 , mexpiration ) # type : ignore
876876 (l ,) = struct .unpack ("!H" , ldata )
877- rwire = await _read_exactly (tcp_sock , l , mexpiration ) # pyright : ignore
877+ rwire = await _read_exactly (tcp_sock , l , mexpiration ) # type : ignore
878878 r = dns .message .from_wire (
879879 rwire ,
880880 keyring = query .keyring ,
@@ -929,13 +929,13 @@ async def inbound_xfr(
929929 )
930930 async with s :
931931 try :
932- async for _ in _inbound_xfr ( # pyright : ignore
932+ async for _ in _inbound_xfr ( # type : ignore
933933 txn_manager ,
934934 s ,
935935 query ,
936936 serial ,
937937 timeout ,
938- expiration , # pyright : ignore
938+ expiration , # type : ignore
939939 ):
940940 pass
941941 return
@@ -947,7 +947,7 @@ async def inbound_xfr(
947947 af , socket .SOCK_STREAM , 0 , stuple , dtuple , _timeout (expiration )
948948 )
949949 async with s :
950- async for _ in _inbound_xfr ( # pyright : ignore
951- txn_manager , s , query , serial , timeout , expiration # pyright : ignore
950+ async for _ in _inbound_xfr ( # type : ignore
951+ txn_manager , s , query , serial , timeout , expiration # type : ignore
952952 ):
953953 pass
0 commit comments