diff --git a/src/scribe_data/cli/convert.py b/src/scribe_data/cli/convert.py index 9ba1147c..eee3862b 100644 --- a/src/scribe_data/cli/convert.py +++ b/src/scribe_data/cli/convert.py @@ -443,7 +443,9 @@ def convert_wrapper( None """ output_type = output_type.lower() - print(f"Converting data for {language.capitalize()} {data_type.capitalize()} to {output_type}...") + print( + f"Converting data for {language.capitalize()} {data_type.capitalize()} to {output_type}..." + ) # Route the function call to the correct conversion function. if output_type == "json": diff --git a/src/scribe_data/cli/get.py b/src/scribe_data/cli/get.py index b0da0b65..b45fc477 100644 --- a/src/scribe_data/cli/get.py +++ b/src/scribe_data/cli/get.py @@ -142,7 +142,9 @@ def get_data( elif language or data_type: data_type = data_type[0] if isinstance(data_type, list) else data_type - print(f"Updating data for language(s): {language.capitalize()}; data type(s): {data_type.capitalize()}") + print( + f"Updating data for language(s): {language.capitalize()}; data type(s): {data_type.capitalize()}" + ) query_data( languages=languages, data_type=data_types, diff --git a/src/scribe_data/cli/main.py b/src/scribe_data/cli/main.py index 64643bff..7286b03f 100644 --- a/src/scribe_data/cli/main.py +++ b/src/scribe_data/cli/main.py @@ -289,9 +289,11 @@ def main() -> None: elif args.command in ["total", "t"]: total_wrapper( language=args.language.lower() if args.language is not None else None, - data_type=args.data_type.lower() if args.data_type is not None else None, - all_bool=args.all - ) + data_type=args.data_type.lower() + if args.data_type is not None + else None, + all_bool=args.all, + ) elif args.command in ["convert", "c"]: convert_wrapper( diff --git a/src/scribe_data/cli/total.py b/src/scribe_data/cli/total.py index b131b745..40f4f682 100644 --- a/src/scribe_data/cli/total.py +++ b/src/scribe_data/cli/total.py @@ -86,7 +86,7 @@ def get_datatype_list(language): if not language_data: raise ValueError(f"Language '{language.capitalize()}' is not recognized.") - + data_types = [f.name for f in language_dir.iterdir() if f.is_dir()] if not data_types: raise ValueError( diff --git a/src/scribe_data/unicode/generate_emoji_keywords.py b/src/scribe_data/unicode/generate_emoji_keywords.py index fd40a8d4..a2f17d18 100644 --- a/src/scribe_data/unicode/generate_emoji_keywords.py +++ b/src/scribe_data/unicode/generate_emoji_keywords.py @@ -67,7 +67,9 @@ def generate_emoji(language, output_dir: str = None): print(f"Emoji Generation for language {language.capitalize()} is supported") else: - print(f"Emoji Generation for language {language.capitalize()} is not supported") + print( + f"Emoji Generation for language {language.capitalize()} is not supported" + ) return updated_path = output_dir[2:] if output_dir.startswith("./") else output_dir diff --git a/src/scribe_data/utils.py b/src/scribe_data/utils.py index 3bf9b119..f0a16340 100644 --- a/src/scribe_data/utils.py +++ b/src/scribe_data/utils.py @@ -84,7 +84,9 @@ sub_qid = sub_lang_data.get("qid") if sub_qid is None: - print(f"Warning: 'qid' missing for sub-language {sub_lang.capitalize()} of {lang.capitalize()}") + print( + f"Warning: 'qid' missing for sub-language {sub_lang.capitalize()} of {lang.capitalize()}" + ) else: language_map[sub_lang_lower] = sub_lang_data @@ -311,7 +313,9 @@ def export_formatted_data( ------- None """ - export_path = Path(file_path) / language.capitalize() / f"{data_type.replace('-', '_')}.json" + export_path = ( + Path(file_path) / language.capitalize() / f"{data_type.replace('-', '_')}.json" + ) with open(export_path, "w", encoding="utf-8") as file: json.dump(formatted_data, file, ensure_ascii=False, indent=0)