Skip to content

Commit de3c236

Browse files
committed
Fix some documentations
1 parent 23be829 commit de3c236

File tree

8 files changed

+46
-17
lines changed

8 files changed

+46
-17
lines changed

minoshiro/minoshiro.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, db_controller: DataController, mal_config: dict,
5252
5353
:param loop:
5454
An asyncio event loop. If not provided will use the default
55-
event loop.
55+
event loop.
5656
"""
5757
self.session_manager = SessionManager()
5858
mal_user, mal_pass = mal_config.get('user'), mal_config.get('password')
@@ -128,7 +128,7 @@ async def from_postgres(cls, mal_config: dict, db_config: dict = None,
128128
:param loop:
129129
An asyncio event loop. If not provided will use the default
130130
event loop.
131-
131+
132132
:return:
133133
Instance of `minoshiro` with class `PostgresController`
134134
as the database controller.
@@ -241,10 +241,10 @@ async def yield_data(self, query: str, medium: Medium,
241241
:param sites:
242242
an iterable of sites desired. If None is provided, will
243243
search all sites by default.
244-
245-
:param timeout:
244+
245+
:param timeout:
246246
The timeout in seconds for each HTTP request. Defualt is 3.
247-
247+
248248
:return:
249249
an asynchronous generator that yields the site and data
250250
in a tuple for all sites requested.
@@ -278,8 +278,8 @@ async def get_data(self, query: str, medium: Medium,
278278
:param sites:
279279
an iterable of sites desired. If None is provided, will
280280
search all sites by default.
281-
282-
:param timeout:
281+
282+
:param timeout:
283283
The timeout in seconds for each HTTP request. Defualt is 3.
284284
285285
:return: Data for all sites in a dict {Site: data}
@@ -366,10 +366,10 @@ async def __find_anilist(self, cached_data, cached_ids,
366366
:param medium: the medium type.
367367
368368
:param query: the search query.
369-
370-
:param timeout:
369+
370+
:param timeout:
371371
The timeout in seconds for each HTTP request. Defualt is 3.
372-
372+
373373
:return: the anilist data and id in a tuple if found.
374374
"""
375375
if medium not in (Medium.ANIME, Medium.MANGA, Medium.LN):
@@ -661,10 +661,10 @@ async def __get_result(self, cached_data, cached_id, query, names,
661661
:param query: the search query.
662662
663663
:param medium: the medium type.
664-
665-
:param timeout:
664+
665+
:param timeout:
666666
The timeout in seconds for each HTTP request. Defualt is 3.
667-
667+
668668
:return: Search results data and id in a tuple for that site.
669669
"""
670670
try:

minoshiro/web_api/ani_list.py

+9
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ async def get_entry_by_id(session_manager: SessionManager,
9797
9898
:param entry_id: thing id.
9999
100+
:param timeout:
101+
The timeout in seconds for each HTTP request. Defualt is 3.
102+
100103
:return: dict with thing info.
101104
"""
102105
headers = {
@@ -125,6 +128,9 @@ async def get_entry_details(session_manager: SessionManager,
125128
126129
:param query: the search term.
127130
131+
:param timeout:
132+
The timeout in seconds for each HTTP request. Defualt is 3.
133+
128134
:return: dict with thing info.
129135
"""
130136
if medium not in (Medium.ANIME, Medium.MANGA, Medium.LN):
@@ -154,6 +160,9 @@ async def get_page_by_popularity(session_manager, medium: Medium,
154160
155161
:param page: page we want info from
156162
163+
:param timeout:
164+
The timeout in seconds for each HTTP request. Defualt is 10.
165+
157166
:return: dict of page
158167
"""
159168
med_str = filter_anime_manga(medium)

minoshiro/web_api/anime_planet.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ async def get_anime_url(session_manager, query, names: list,
2424
"""
2525
Get anime url by search query.
2626
27-
:param timeout: Time out seconds.
28-
2927
:param session_manager: the `SessionManager` instance.
3028
3129
:param query: a search query.
3230
3331
:param names: a list of synonyms
3432
33+
:param timeout:
34+
The timeout in seconds for each HTTP request. Defualt is 3.
35+
3536
:return: the anime url if it's found.
3637
"""
3738
query = sanitize_search_text(query)
@@ -62,8 +63,6 @@ async def get_manga_url(session_manager, query,
6263
"""
6364
Get manga url by search query.
6465
65-
:param timeout: Timeout seconds.
66-
6766
:param session_manager: the `SessionManager` instance.
6867
6968
:param query: a search query.
@@ -72,6 +71,9 @@ async def get_manga_url(session_manager, query,
7271
7372
:param author_name: name for the manga author name
7473
74+
:param timeout:
75+
The timeout in seconds for each HTTP request. Defualt is 3.
76+
7577
:return: the anime url if it's found.
7678
"""
7779
params = {

minoshiro/web_api/kitsu.py

+6
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ async def search_entries(self, medium: Medium,
9292
9393
:param query: the search term.
9494
95+
:param timeout:
96+
The timeout in seconds for each HTTP request. Defualt is 3.
97+
9598
:return: dict with thing info.
9699
"""
97100
medium_str = 'anime' if medium == Medium.ANIME else 'manga'
@@ -116,6 +119,9 @@ async def get_entry_by_id(self, medium, id_, timeout=3) -> Optional[dict]:
116119
117120
:param id_: the id.
118121
122+
:param timeout:
123+
The timeout in seconds for each HTTP request. Defualt is 3.
124+
119125
:return: dict with thing info.
120126
"""
121127
medium_str = 'anime' if medium == Medium.ANIME else 'manga'

minoshiro/web_api/lndb.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ async def get_light_novel_url(
2020
2121
:param names: a list of known names
2222
23+
:param timeout:
24+
The timeout in seconds for each HTTP request. Defualt is 3.
25+
2326
:return: the ln url if it's found.
2427
"""
2528
query = query.replace(' ', '+')

minoshiro/web_api/mal.py

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ async def get_entry_details(session_manager, header_info: dict,
2626
2727
:param thing_id: thing id.
2828
29+
:param timeout:
30+
The timeout in seconds for each HTTP request. Defualt is 3.
31+
2932
:return: dict with thing info.
3033
"""
3134
medium_str = 'anime' if medium == Medium.ANIME else 'manga'

minoshiro/web_api/mu.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ async def get_manga_url(session_manager, query,
2020
2121
:param names: a list of known names
2222
23+
:param timeout:
24+
The timeout in seconds for each HTTP request. Defualt is 3.
25+
2326
:return: the manga url if it's found.
2427
"""
2528
params = {

minoshiro/web_api/nu.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ async def get_light_novel_url(session_manager, query,
2020
2121
:param names: a list of known names
2222
23+
:param timeout:
24+
The timeout in seconds for each HTTP request. Defualt is 3.
25+
2326
:return: the ln url if it's found.
2427
"""
2528
params = {

0 commit comments

Comments
 (0)