Skip to content

Commit

Permalink
Run updated black
Browse files Browse the repository at this point in the history
  • Loading branch information
rsheeter committed Oct 6, 2023
1 parent dd3cd59 commit 9def0ca
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion nototools/cmap_block_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def _list_range(
only_scripts,
details,
):

if limit_cp != start_cp + 1:
range_text = "%04x-%04x" % (start_cp, limit_cp - 1)
else:
Expand Down
1 change: 1 addition & 0 deletions nototools/generate_sample_from_exemplar.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def get_script_to_exemplar_data_map():
no_latin = True
else:
no_latin = False

# exclude exemplar strings, and restrict to letters and digits
def accept_cp(cp):
if len(cp) != 1:
Expand Down
1 change: 0 additions & 1 deletion nototools/generate_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ def parse_sample_gen(definition):
def generate_samples(
defs_file, out_file, patterns=None, group=False, sep="\t", label=False, sort=False
):

with codecs.open(defs_file, "r", "utf-8") as f:
sample_gen = parse_sample_gen(f.read())
if sample_gen:
Expand Down
5 changes: 0 additions & 5 deletions nototools/generate_website_2_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def check_families(family_map):
and unhinted_members
and len(hinted_members) != len(unhinted_members)
):

# Let's not consider this an error for now. Just drop the members with
# the higher number of fonts, assuming it's a superset of the fonts in the
# smaller set, so that the fonts we provide and display are available to
Expand Down Expand Up @@ -197,7 +196,6 @@ def get_family_id_to_lang_scrs(lang_scrs, script_to_family_ids):
def get_family_id_to_lang_scr_to_sample_key(
family_id_to_lang_scrs, families, lang_scr_to_sample_infos
):

"""For each lang_scr + family combination, determine which sample to use
from those available for the lang_scr. If the family can't display any
of the samples, report an error, the lang will not be added to those
Expand Down Expand Up @@ -417,7 +415,6 @@ def lang_key(lang_scr):


def get_charset_info(charset):

"""Returns an encoding of the charset as pairs of lengths of runs of chars
to skip and chars to include. Each length is written as length - 1 in
hex-- except when length == 1, which is written as the empty string-- and
Expand Down Expand Up @@ -926,7 +923,6 @@ def build_data_json(
family_id_to_regions,
region_to_family_ids,
):

data_obj = collections.OrderedDict()
families_obj = collections.OrderedDict()

Expand Down Expand Up @@ -1074,7 +1070,6 @@ def build_family_json(
css_info,
default_lang_scr,
):

family_obj = collections.OrderedDict()
category = get_css_generic_family(family.name)
if category:
Expand Down
1 change: 0 additions & 1 deletion nototools/hb_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _inputs_from_gsub(self, name, seen):
return inputs
for lookup_index, lookup in enumerate(gsub.LookupList.Lookup):
for st in lookup.SubTable:

# see if this glyph can be a single-glyph substitution
if lookup.LookupType == 1:
for glyph, subst in st.mapping.items():
Expand Down
1 change: 1 addition & 0 deletions nototools/lang_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from nototools import cldr_data
from nototools import unicode_data


# controls printing of debug/trace information
# normally disabled
def _log(msg):
Expand Down
3 changes: 2 additions & 1 deletion nototools/lint_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def parse_int_ranges(range_string, is_hex=True, sep=" "):

def write_int_ranges(int_values, in_hex=True, sep=" "):
"""From a set or list of ints, generate a string representation that can
be parsed by parse_int_ranges to return the original values (not order_preserving)."""
be parsed by parse_int_ranges to return the original values (not order_preserving).
"""

if not int_values:
return ""
Expand Down
1 change: 1 addition & 0 deletions nototools/noto_cmap_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,7 @@ def _generate_script_extra(script_to_chars):
),
]


# This is a utility function that parses the _script_required data
# and spits it out again in the above format. When editing the
# above data, just type in the hex values, then run this to regenerate
Expand Down
1 change: 0 additions & 1 deletion nototools/noto_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,6 @@ def check_ul_unicode_range():
proportion_val = os2_table.panose.bProportion
is_mono = proportion_val == 9
if proportion_val <= 1:

warn(
"head/os2/panose/proportion",
"OS/2",
Expand Down
1 change: 0 additions & 1 deletion nototools/subset_font_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _get_default_options():


def subset_font_cmap(srcname, dstname, exclude=None, include=None, bump_version=True):

opt = _DEFAULT_OPTIONS

font = subset.load_font(srcname, opt)
Expand Down
1 change: 1 addition & 0 deletions nototools/unicode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def _load_emoji_data():
]
)


# Unicode 12 decided to be 'helpful' and included single emoji in the sequence
# data, but unlike all the other data represents these in batches as XXXX..XXXX
# rather than one per line. We can't get name data for these so we can't
Expand Down
2 changes: 0 additions & 2 deletions nototools/unittests/font_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def test_family_name(self):
"""Tests the family name."""

for font_file, records in zip(self.font_files, self.names):

family, weight, _ = self.parse_filename(font_file)

# check that family name includes weight, if not regular or bold
Expand Down Expand Up @@ -398,7 +397,6 @@ def test_num_features(self):
def run_test(
glyph_order, glyph_set, fontfile, tags, proportional=False, oldstyle=False
):

num = glyph_order[layout.get_glyphs("1", fontfile)[0]]
styled = glyph_order[
layout.get_glyphs("1", fontfile, "--features=" + ",".join(tags))[0]
Expand Down

0 comments on commit 9def0ca

Please sign in to comment.