From f77c4dcfb5f3051197b8453711d643b3770198ac Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 4 Nov 2022 00:09:29 +0100 Subject: [PATCH] fix: fix check for empty notice handlers list Issue reported by Mypy 0.990. Thank you! --- psycopg/psycopg/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/psycopg/connection.py b/psycopg/psycopg/connection.py index 5f98dbc6e..d40b4807f 100644 --- a/psycopg/psycopg/connection.py +++ b/psycopg/psycopg/connection.py @@ -335,7 +335,7 @@ class BaseConnection(Generic[Row]): wself: "ReferenceType[BaseConnection[Row]]", res: "PGresult" ) -> None: self = wself() - if not (self and self._notice_handler): + if not (self and self._notice_handlers): return diag = e.Diagnostic(res, pgconn_encoding(self.pgconn)) -- 2.47.2