]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Add a type hint for a list in dns tests
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 4 Nov 2021 14:59:37 +0000 (15:59 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 10 Nov 2021 01:57:39 +0000 (02:57 +0100)
tests/test_dns_srv.py

index 30ac1f556dc932d3eef537230c822e8a2135d751..383a9cbf60ddcfb740dd42977a9cc5dda132fa0a 100644 (file)
@@ -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: