Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adodbapi: Update collections literals and comprehensions #2109

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adodbapi/adodbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion adodbapi/apibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.values())
s = "<SQLrow={"
for name, i in taglist:
s += f"{name}:{self._getValue(i)!r}, "
Expand Down
Loading