]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
Reformat with black
authorSimon Cozens <simon@simon-cozens.org>
Tue, 1 Nov 2022 21:40:07 +0000 (21:40 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Tue, 1 Nov 2022 21:40:07 +0000 (21:40 +0000)
tests/test_data_languages.py

index f71aadaa3ba723d08ed98556742aa21be1548340..afb9c3bc79e64c8783d5253ff3b039da51bed77b 100644 (file)
 #
 import pytest
 from collections import Counter
-from gflanguages import LoadLanguages,languages_public_pb2
+from gflanguages import LoadLanguages, languages_public_pb2
 
 
 LANGUAGES = LoadLanguages()
 
+
 @pytest.mark.parametrize("lang_code", LANGUAGES)
 @pytest.mark.parametrize(
-    "exemplar_name",
-    ["base", "auxiliary", "marks", "numerals", "punctuation", "index"]
+    "exemplar_name", ["base", "auxiliary", "marks", "numerals", "punctuation", "index"]
 )
 def test_languages_exemplars_duplicates(lang_code, exemplar_name):
     lang = LANGUAGES[lang_code]
     exemplar = getattr(lang.exemplar_chars, exemplar_name).split()
     counter = Counter(exemplar)
-    counts = sorted(counter.most_common(), key=lambda pair:
-                    exemplar.index(pair[0]))
-    assert (counts == [(v, 1) for v in exemplar])
+    counts = sorted(counter.most_common(), key=lambda pair: exemplar.index(pair[0]))
+    assert counts == [(v, 1) for v in exemplar]
 
 
 SampleText = languages_public_pb2.SampleTextProto().DESCRIPTOR
 
+
 @pytest.mark.parametrize("lang_code", LANGUAGES.keys())
 def test_language_samples(lang_code):
     # Although marked as optional in the protobuf file, all
@@ -48,4 +48,4 @@ def test_language_samples(lang_code):
         return
 
     for field in SampleText.fields:
-        assert(getattr(lang.sample_text, field.name))
+        assert getattr(lang.sample_text, field.name)