From add26b698eafc4a151cefe3e9a9cdc9e87658579 Mon Sep 17 00:00:00 2001 From: rachmadaniHaryono Date: Sun, 28 Apr 2019 10:27:44 +0800 Subject: [PATCH] new: dev: use TypedDict --- buku | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buku b/buku index 3e77d26..5d5c762 100755 --- a/buku +++ b/buku @@ -43,6 +43,7 @@ except ImportError: pass from bs4 import BeautifulSoup import certifi +from mypy_extensions import TypedDict import urllib3 from urllib3.exceptions import LocationParseError from urllib3.util import parse_url, make_headers @@ -2762,7 +2763,12 @@ PROMPT KEYS: # ---------------- -def convert_bookmark_set(bookmark_set: List[Tuple[Any, Any, Any, Any, Any, Any]], export_type: str) -> Dict[str, Any]: +ConverterResult = TypedDict('ConverterResult', {'data': str, 'count': int}) + + +def convert_bookmark_set( + bookmark_set: List[Tuple[Any, Any, Any, Any, Any, Any]], + export_type: str) -> ConverterResult: """Convert list of bookmark set into multiple data format. Parameters