From ac2e80cf0e35afa5eafbd08969d76e5786fcc513 Mon Sep 17 00:00:00 2001 From: Phillip Simonds Date: Thu, 14 Oct 2021 18:14:59 -0700 Subject: [PATCH] Fix Tuple type hint The type hint for the probe async coroutine definition was 'tuple' instead of 'Tuple'. This caused python 3.8.10 to fail to compile the code. --- 21-async/domains/asyncio/blogdom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/21-async/domains/asyncio/blogdom.py b/21-async/domains/asyncio/blogdom.py index 0121733..403a816 100755 --- a/21-async/domains/asyncio/blogdom.py +++ b/21-async/domains/asyncio/blogdom.py @@ -2,11 +2,12 @@ import asyncio import socket from keyword import kwlist +from typing import Tuple MAX_KEYWORD_LEN = 4 # <1> -async def probe(domain: str) -> tuple[str, bool]: # <2> +async def probe(domain: str) -> Tuple[str, bool]: # <2> loop = asyncio.get_running_loop() # <3> try: await loop.getaddrinfo(domain, None) # <4>