]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
run black
authorMarc Foley <m.foley.88@gmail.com>
Wed, 22 Feb 2023 16:00:06 +0000 (16:00 +0000)
committerMarc Foley <m.foley.88@gmail.com>
Wed, 22 Feb 2023 16:31:32 +0000 (16:31 +0000)
Lib/gflanguages/__init__.py

index 68afcc0631c2b42be5dfc0919b74243946bd0d24..5c044c629420bb1de426f4dcc4a78c28e384887e 100644 (file)
@@ -39,10 +39,10 @@ def LoadLanguages(base_dir=DATA_DIR):
     if base_dir is None:
         base_dir = DATA_DIR
 
-    languages_dir = os.path.join(base_dir, 'languages')
+    languages_dir = os.path.join(base_dir, "languages")
     langs = {}
-    for textproto_file in glob.iglob(os.path.join(languages_dir, '*.textproto')):
-        with open(textproto_file, 'r', encoding='utf-8') as f:
+    for textproto_file in glob.iglob(os.path.join(languages_dir, "*.textproto")):
+        with open(textproto_file, "r", encoding="utf-8") as f:
             language = text_format.Parse(f.read(), languages_public_pb2.LanguageProto())
             langs[language.id] = language
     return langs
@@ -52,10 +52,10 @@ def LoadScripts(base_dir=DATA_DIR):
     if base_dir is None:
         base_dir = DATA_DIR
 
-    scripts_dir = os.path.join(base_dir, 'scripts')
+    scripts_dir = os.path.join(base_dir, "scripts")
     scripts = {}
-    for textproto_file in glob.iglob(os.path.join(scripts_dir, '*.textproto')):
-        with open(textproto_file, 'r', encoding='utf-8') as f:
+    for textproto_file in glob.iglob(os.path.join(scripts_dir, "*.textproto")):
+        with open(textproto_file, "r", encoding="utf-8") as f:
             script = text_format.Parse(f.read(), languages_public_pb2.ScriptProto())
             scripts[script.id] = script
     return scripts
@@ -65,10 +65,10 @@ def LoadRegions(base_dir=DATA_DIR):
     if base_dir is None:
         base_dir = DATA_DIR
 
-    regions_dir = os.path.join(base_dir, 'regions')
+    regions_dir = os.path.join(base_dir, "regions")
     regions = {}
-    for textproto_file in glob.iglob(os.path.join(regions_dir, '*.textproto')):
-        with open(textproto_file, 'r', encoding='utf-8') as f:
+    for textproto_file in glob.iglob(os.path.join(regions_dir, "*.textproto")):
+        with open(textproto_file, "r", encoding="utf-8") as f:
             region = text_format.Parse(f.read(), languages_public_pb2.RegionProto())
             regions[region.id] = region
     return regions