From 097faaca1eb1b29697d3ab805d4caa6807e033ad Mon Sep 17 00:00:00 2001 From: Phish <69989217+phishontop@users.noreply.github.com> Date: Wed, 26 Apr 2023 14:51:03 +0100 Subject: Update __init__.py simple fix used builtin map func instead of a list comprehension, incorrect usage of comprehensions. --- phind/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phind/__init__.py') diff --git a/phind/__init__.py b/phind/__init__.py index 9f000c6f..e7009d67 100644 --- a/phind/__init__.py +++ b/phind/__init__.py @@ -26,7 +26,7 @@ class PhindResponse: 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: -- cgit v1.2.3