From: Denis Laxalde Date: Thu, 4 Nov 2021 14:59:37 +0000 (+0100) Subject: Add a type hint for a list in dns tests X-Git-Tag: 3.0.3~3^2~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efa146d3c0ccf1ce34d4d6589d96bbc56a69ce6a;p=thirdparty%2Fpsycopg.git Add a type hint for a list in dns tests --- diff --git a/tests/test_dns_srv.py b/tests/test_dns_srv.py index 30ac1f556..383a9cbf6 100644 --- a/tests/test_dns_srv.py +++ b/tests/test_dns_srv.py @@ -1,3 +1,5 @@ +from typing import List, Union + import pytest import psycopg @@ -149,7 +151,7 @@ def get_fake_srv_function(monkeypatch): ans = fake_hosts[qname, rdtype] except KeyError: raise DNSException(f"unknown test host: {qname} {rdtype}") - rv = [] + rv: List[Union[A, SRV]] = [] if rdtype == "A": for entry in ans: