Enable the explicit-f-string-type-conversion rule and fix warnings (#2954)

This commit is contained in:
correctmost 2024-11-28 14:43:13 -05:00 committed by GitHub
parent 7b291a6681
commit 80eebcff4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class SubvolumeMenu(ListManager):
case ResultType.Reset:
raise ValueError('Unhandled result type')
header = f"{str(_('Subvolume name'))}: {name}\n"
header = f"{_('Subvolume name')}: {name}\n"
path = prompt_dir(
str(_("Subvolume mountpoint")),

View File

@ -310,7 +310,7 @@ class GlobalMenu(AbstractMenu):
if network_config.type == NicType.MANUAL:
output = FormattedOutput.as_table(network_config.nics)
else:
output = f'{str(_('Network configuration'))}:\n{network_config.type.display_msg()}'
output = f'{_('Network configuration')}:\n{network_config.type.display_msg()}'
return output
return None
@ -363,7 +363,7 @@ class GlobalMenu(AbstractMenu):
def _prev_uki(self, item: MenuItem) -> str | None:
if item.value is not None:
output = f'{str(_('Unified kernel images'))}: '
output = f'{_('Unified kernel images')}: '
output += str(_('Enabled')) if item.value else str(_('Disabled'))
return output
return None

View File

@ -222,7 +222,6 @@ ignore = [
"E722", # bare-except
"PLW2901", # redefined-loop-name
"RUF005", # collection-literal-concatenation
"RUF010", # explicit-f-string-type-conversion
"RUF012", # mutable-class-default
"RUF015", # unnecessary-iterable-allocation-for-first-element
"RUF039", # unraw-re-pattern