Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
simple fix used builtin map func instead of a list comprehension, incorrect usage of comprehensions.
  • Loading branch information
phishontop authored Apr 26, 2023
1 parent db9f3a5 commit 097faac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __repr__(self) -> str:
return f'''<__main__.APIResponse.Completion.Choices(\n text = {self.text.encode()},\n index = {self.index},\n logprobs = {self.logprobs},\n finish_reason = {self.finish_reason})object at 0x1337>'''

def __init__(self, choices: dict) -> None:
self.choices = [self.Choices(choice) for choice in choices]
self.choices = list(map(self.Choices, choices))

class Usage:
def __init__(self, usage_dict: dict) -> None:
Expand Down

0 comments on commit 097faac

Please sign in to comment.