Skip to content

Commit 8597060

Browse files
committed
Fix list comprehension error.
1 parent ee24831 commit 8597060

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/agent.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ def ___init__(self, function: LowLevelILFunction | MediumLevelILFunction |
3333
# Get the list of available engines.
3434
engines: list[Engine] = openai.Engine.list().data
3535
# Ensure the user's selected engine is available.
36-
# pylint: disable=unnecessary-comprehension
37-
if engine not in [i.id for i in engines]:
36+
if engine not in [e.id for e in engines]:
3837
InvalidEngineException(f'Invalid engine: {engine}. Valid engines '
39-
f'are: {[id for id in engines.id]}')
38+
f'are: {[e.id for e in engines]}')
4039

4140
# Set instance attributes.
4241
self.function = function

0 commit comments

Comments
 (0)