From 7c44fdaf341e192b148962c6dbfd12f45ba2b5e4 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Fri, 5 Nov 2021 11:45:48 +0100 Subject: [PATCH] Only declare type of 'the_conninfo' in test_connect_args() Inform mypy that we're not passing a None to conninfo_to_dict(). --- tests/test_connection.py | 2 +- tests/test_connection_async.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.2