solve assorted issue with newer pylint versions

Includes more use of 'with', adding encodings to open statements
and a couple of issues with parameter renaming.
This commit is contained in:
Sarah Hoffmann
2022-05-11 10:22:14 +02:00
parent 5d5f40a82f
commit 7f7a7df3a2
4 changed files with 23 additions and 22 deletions

View File

@@ -25,7 +25,8 @@ class _Cursor(psycopg2.extras.DictCursor):
execution functions.
"""
def execute(self, query, args=None): # pylint: disable=W0221
# pylint: disable=arguments-renamed,arguments-differ
def execute(self, query, args=None):
""" Query execution that logs the SQL query when debugging is enabled.
"""
LOG.debug(self.mogrify(query, args).decode('utf-8'))