Skip to content

Commit 846842a

Browse files
committed
OpenType: warnings did not get RinohWarning passed
1 parent 8313abc commit 846842a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/rinoh/font/opentype/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,21 @@ def _get_lookup_tables(self, table, feature, script='DFLT', language=None):
129129
script_table = self[table]['ScriptList'].by_tag[script][0]
130130
except KeyError:
131131
if script != 'DFLT':
132-
warn('{} does not support the script "{}". Trying default '
133-
'script.'.format(self.name, script, RinohWarning))
132+
warn(f'{self.name} does not support the script "{script}". '
133+
'Trying default script.', RinohWarning)
134134
try:
135135
return self._get_lookup_tables(table, feature)
136136
except KeyError:
137137
return []
138138
else:
139-
warn('{} has no default script defined.'
140-
.format(self.name, RinohWarning))
139+
warn(f'{self.name} has no default script defined.', RinohWarning)
141140
raise
142141
if language:
143142
try:
144143
lang_sys_table = script_table.by_tag[language][0]
145144
except KeyError:
146-
warn('{} does not support the language "{}". Falling back to '
147-
'defaults.'.format(self.name, language, RinohWarning))
145+
warn(f'{self.name} does not support the language "{language}". '
146+
'Falling back to defaults.', RinohWarning)
148147
lang_sys_table = script_table['DefaultLangSys']
149148
else:
150149
lang_sys_table = script_table['DefaultLangSys']

0 commit comments

Comments
 (0)