From: Denis Laxalde Date: Fri, 5 Nov 2021 10:45:48 +0000 (+0100) Subject: Only declare type of 'the_conninfo' in test_connect_args() X-Git-Tag: 3.0.3~3^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c44fdaf341e192b148962c6dbfd12f45ba2b5e4;p=thirdparty%2Fpsycopg.git Only declare type of 'the_conninfo' in test_connect_args() Inform mypy that we're not passing a None to conninfo_to_dict(). --- diff --git a/tests/test_connection.py b/tests/test_connection.py index 44dd21648..dc8c6bc59 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -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 diff --git a/tests/test_connection_async.py b/tests/test_connection_async.py index 9513c442b..579b6335e 100644 --- a/tests/test_connection_async.py +++ b/tests/test_connection_async.py @@ -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