Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 1714a73

Browse files
committed
build: 0.1.36 formatting
1 parent 135b10f commit 1714a73

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

bardapi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
"max_sentence",
4545
"Tool",
4646
]
47-
__version__ = "0.1.35"
47+
__version__ = "0.1.36"
4848
__author__ = "daniel park <[email protected]>"

bardapi/models/draft.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import List, Optional, Union, Dict, Tuple
22

33
from bardapi.models.citation import DraftCitation
44
from bardapi.models.tools.code import CodeContent
@@ -22,7 +22,7 @@ def text(self) -> str:
2222
return self._input_list[1][0]
2323

2424
@property
25-
def citations(self) -> list[DraftCitation]:
25+
def citations(self) -> List[DraftCitation]:
2626
text = self.text
2727
return (
2828
[DraftCitation(c, text) for c in self._input_list[2][0]]
@@ -31,7 +31,7 @@ def citations(self) -> list[DraftCitation]:
3131
)
3232

3333
@property
34-
def images(self) -> list[BardImageContent]:
34+
def images(self) -> List[BardImageContent]:
3535
# also in self._attachments[1]
3636
return (
3737
[BardImageContent(img) for img in self._input_list[4]]
@@ -49,7 +49,7 @@ def _attachments(self) -> Optional[list]:
4949
return self._input_list[12]
5050

5151
@property
52-
def map_content(self) -> list[BardMapContent]:
52+
def map_content(self) -> List[BardMapContent]:
5353
if not self._attachments:
5454
return []
5555
return (
@@ -59,7 +59,7 @@ def map_content(self) -> list[BardMapContent]:
5959
)
6060

6161
@property
62-
def gdocs(self) -> list[BardGDocsContent]:
62+
def gdocs(self) -> List[BardGDocsContent]:
6363
if not self._attachments:
6464
return []
6565
return (
@@ -69,7 +69,7 @@ def gdocs(self) -> list[BardGDocsContent]:
6969
)
7070

7171
@property
72-
def youtube(self) -> list[BardYoutubeContent]:
72+
def youtube(self) -> List[BardYoutubeContent]:
7373
if not self._attachments:
7474
return []
7575
return (
@@ -79,7 +79,7 @@ def youtube(self) -> list[BardYoutubeContent]:
7979
)
8080

8181
@property
82-
def python_code(self) -> list[CodeContent]:
82+
def python_code(self) -> List[CodeContent]:
8383
# Google has a dedicated Python model that can also run code.
8484
# The text model uses the output of the Python model to generate answers,
8585
# including answers in other languages.
@@ -94,15 +94,15 @@ def python_code(self) -> list[CodeContent]:
9494
)
9595

9696
@property
97-
def links(self) -> list[BardLink]:
97+
def links(self) -> List[BardLink]:
9898
if not self._attachments:
9999
return []
100100
return (
101101
[BardLink(a) for a in self._attachments[8]] if self._attachments[8] else []
102102
)
103103

104104
@property
105-
def flights(self) -> list[BardFlightContent]:
105+
def flights(self) -> List[BardFlightContent]:
106106
if not self._attachments:
107107
return []
108108
return (
@@ -112,7 +112,7 @@ def flights(self) -> list[BardFlightContent]:
112112
)
113113

114114
@property
115-
def tool_disclaimers(self) -> list[BardToolDeclaimer]:
115+
def tool_disclaimers(self) -> List[BardToolDeclaimer]:
116116
if not self._attachments or len(self._attachments) < 23:
117117
return []
118118

@@ -123,7 +123,7 @@ def tool_disclaimers(self) -> list[BardToolDeclaimer]:
123123
)
124124

125125
@property
126-
def user_content(self) -> dict[str, UserContent]:
126+
def user_content(self) -> Dict[str, UserContent]:
127127
d = {v.key: v for v in self.youtube}
128128
d.update({v.key: v for v in self.map_content})
129129
d.update({v.key: v for v in self.flights})

bardapi/models/result.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import List, Optional, Union, Dict, Tuple
22

33
from bardapi.models.draft import BardDraft
44
from bardapi.models.tools.tool import BardTool
@@ -35,15 +35,15 @@ def __init__(self, input_list: list):
3535
self.response_id = self._input_list[1][1]
3636

3737
@property
38-
def search_queries(self) -> list[str, int]:
38+
def search_queries(self) -> List[str, int]:
3939
return self._input_list[2]
4040

4141
@property
4242
def factuality_queries(self) -> Optional[list]:
4343
return self._input_list[3]
4444

4545
@property
46-
def drafts(self) -> list[BardDraft]:
46+
def drafts(self) -> List[BardDraft]:
4747
return (
4848
[BardDraft(c) for c in self._input_list[4]] if self._input_list[4] else []
4949
)
@@ -67,7 +67,7 @@ def topic(self) -> Optional[str]:
6767
return self._input_list[10][0]
6868

6969
@property
70-
def tools_applied(self) -> list[BardTool]:
70+
def tools_applied(self) -> List[BardTool]:
7171
if len(self._input_list) < 12:
7272
return []
7373
return (

bardapi/models/tools/youtube.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import List, Optional, Union, Dict, Tuple
22

33
from bardapi.models.user_content import UserContent
44

@@ -28,7 +28,7 @@ def channel_logo(self) -> str:
2828
return self._input_list[4]
2929

3030
@property
31-
def text(self) -> Optional[list[str]]:
31+
def text(self) -> Optional[List[str]]:
3232
return self._input_list[5]
3333

3434
def __str__(self) -> str:
@@ -60,7 +60,7 @@ def __len__(self):
6060
return len(self._input_list[4][0])
6161

6262
@property
63-
def videos(self) -> list[BardYoutubeVideo]:
63+
def videos(self) -> List[BardYoutubeVideo]:
6464
return (
6565
[BardYoutubeVideo(video) for video in self._input_list[4][0]]
6666
if self._input_list[4]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_long_description():
2525

2626
setup(
2727
name="bardapi",
28-
version="0.1.35",
28+
version="0.1.36",
2929
author="daniel park",
3030
author_email="[email protected]",
3131
description="The python package that returns Response of Google Bard through API.",

0 commit comments

Comments
 (0)