]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Only declare type of 'the_conninfo' in test_connect_args()
authorDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 5 Nov 2021 10:45:48 +0000 (11:45 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 10 Nov 2021 01:57:39 +0000 (02:57 +0100)
Inform mypy that we're not passing a None to conninfo_to_dict().

tests/test_connection.py
tests/test_connection_async.py

index 44dd2164868945c2f05d1122da519539f563d797..dc8c6bc59f493bde3c2c1d86d3f6395ce398414f 100644 (file)
@@ -320,7 +320,7 @@ def test_autocommit_unknown(conn):
     ],
 )
 def test_connect_args(monkeypatch, pgconn, args, kwargs, want):
-    the_conninfo = None
+    the_conninfo: str
 
     def fake_connect(conninfo):
         nonlocal the_conninfo
index 9513c442b4357db84eb0df3a08b7d7ff9dd84b80..579b6335eb036cd3121aa69437bab9aabba1b42f 100644 (file)
@@ -330,7 +330,7 @@ async def test_autocommit_unknown(aconn):
     ],
 )
 async def test_connect_args(monkeypatch, pgconn, args, kwargs, want):
-    the_conninfo = None
+    the_conninfo: str
 
     def fake_connect(conninfo):
         nonlocal the_conninfo