fix: test: flake8
This commit is contained in:
parent
947eaf666f
commit
d113cfa84e
14
buku
14
buku
@ -489,7 +489,7 @@ class BukuDb:
|
||||
self.cur.execute('SELECT * FROM bookmarks')
|
||||
return self.cur.fetchall()
|
||||
|
||||
def get_rec_by_id(self, index: int)-> Union[BookmarkVar, None]:
|
||||
def get_rec_by_id(self, index: int) -> Union[BookmarkVar, None]:
|
||||
"""Get a bookmark from database by its ID.
|
||||
|
||||
Parameters
|
||||
@ -755,7 +755,7 @@ class BukuDb:
|
||||
tags_in: Optional[str] = None,
|
||||
desc: Optional[str] = None,
|
||||
immutable: Optional[int] = -1,
|
||||
threads: Optional[int]=4) -> bool:
|
||||
threads: Optional[int] = 4) -> bool:
|
||||
"""Update an existing record at index.
|
||||
|
||||
Update all records if index is 0 and url is not specified.
|
||||
@ -921,7 +921,7 @@ class BukuDb:
|
||||
|
||||
return True
|
||||
|
||||
def refreshdb(self, index: int, threads: int)->bool:
|
||||
def refreshdb(self, index: int, threads: int) -> bool:
|
||||
"""Refresh ALL records in the database.
|
||||
|
||||
Fetch title for each bookmark from the web and update the records.
|
||||
@ -1439,7 +1439,7 @@ class BukuDb:
|
||||
high: Optional[int] = 0,
|
||||
is_range: Optional[bool] = False,
|
||||
delay_commit: Optional[bool] = False
|
||||
)->bool:
|
||||
) -> bool:
|
||||
"""Delete a single record or remove the table if index is None.
|
||||
|
||||
Parameters
|
||||
@ -1803,7 +1803,7 @@ class BukuDb:
|
||||
|
||||
return parse_tags(tags)
|
||||
|
||||
def replace_tag(self, orig: str, new: Union[List[str], None]=None)->bool:
|
||||
def replace_tag(self, orig: str, new: Union[List[str], None] = None) -> bool:
|
||||
"""Replace original tag by new tags in all records.
|
||||
|
||||
Remove original tag if new tag is empty.
|
||||
@ -2490,7 +2490,7 @@ class BukuDb:
|
||||
self,
|
||||
index: Optional[int] = 0,
|
||||
url: Optional[str] = None,
|
||||
shorten: Optional[bool] = True)->Union[str, None]:
|
||||
shorten: Optional[bool] = True) -> Union[str, None]:
|
||||
"""Shorten a URL using Google URL shortener.
|
||||
|
||||
Parameters
|
||||
@ -3459,7 +3459,7 @@ def get_PoolManager():
|
||||
def network_handler(
|
||||
url: str,
|
||||
http_head: Optional[bool] = False
|
||||
)->Tuple[Union[str, None], Union[str, None], Union[str, None], int, int]:
|
||||
) -> Tuple[Union[str, None], Union[str, None], Union[str, None], int, int]:
|
||||
"""Handle server connection and redirections.
|
||||
|
||||
Parameters
|
||||
|
Loading…
x
Reference in New Issue
Block a user