Skip to content

Commit

Permalink
chore: Run pyupgrade --py38-plus **/*.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 10, 2023
1 parent 4f1d3bc commit 67d0d48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ocdskit/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ def items(self, **kwargs):
"""
for item in super().items(**kwargs):
if isinstance(item, list):
for i in item:
yield i
yield from item
else:
yield item

Expand Down
3 changes: 1 addition & 2 deletions ocdskit/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ def get_releases_by_ocid(self):
self.connection.execute("CREATE INDEX IF NOT EXISTS ocid_idx ON releases(ocid)")

results = self.connection.execute("SELECT * FROM releases ORDER BY ocid")
for ocid, rows in itertools.groupby(results, lambda row: row[0]):
yield ocid, rows
yield from itertools.groupby(results, lambda row: row[0])

def close(self):
self.file.close()
Expand Down

0 comments on commit 67d0d48

Please sign in to comment.