From c1232e37a41c452d02fb81ca293b93421f7c4b8d Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 4 Oct 2024 13:31:49 -0400 Subject: [PATCH 1/2] adodbapi: Update collections literals and comprehensions --- adodbapi/adodbapi.py | 4 ++-- adodbapi/apibase.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adodbapi/adodbapi.py b/adodbapi/adodbapi.py index 4e85bc525..369f7587c 100644 --- a/adodbapi/adodbapi.py +++ b/adodbapi/adodbapi.py @@ -1019,7 +1019,7 @@ def executemany(self, operation, seq_of_parameters): Return values are not defined. """ - self.messages = list() + self.messages = [] total_recordcount = 0 self.prepare(operation) @@ -1043,7 +1043,7 @@ def _fetch(self, limit=None): return if self.rs.State == adc.adStateClosed or self.rs.BOF or self.rs.EOF: - return list() + return [] if limit: # limit number of rows retrieved ado_results = self.rs.GetRows(limit) else: # get all rows diff --git a/adodbapi/apibase.py b/adodbapi/apibase.py index 749c378d3..b7d1f3ae3 100644 --- a/adodbapi/apibase.py +++ b/adodbapi/apibase.py @@ -564,7 +564,7 @@ def __next__(self): yield self._getValue(n) def __repr__(self): # create a human readable representation - taglist = sorted(list(self.rows.columnNames.items()), key=lambda x: x[1]) + taglist = sorted(self.rows.columnNames.items(), key=lambda x: x[1]) s = " Date: Fri, 18 Oct 2024 13:51:49 -0400 Subject: [PATCH 2/2] Update adodbapi/apibase.py --- adodbapi/apibase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adodbapi/apibase.py b/adodbapi/apibase.py index b7d1f3ae3..d22173c46 100644 --- a/adodbapi/apibase.py +++ b/adodbapi/apibase.py @@ -564,7 +564,7 @@ def __next__(self): yield self._getValue(n) def __repr__(self): # create a human readable representation - taglist = sorted(self.rows.columnNames.items(), key=lambda x: x[1]) + taglist = sorted(self.rows.columnNames.values()) s = "