Enable the explicit-f-string-type-conversion rule and fix warnings (#2954)
This commit is contained in:
parent
7b291a6681
commit
80eebcff4f
|
|
@ -54,7 +54,7 @@ class SubvolumeMenu(ListManager):
|
||||||
case ResultType.Reset:
|
case ResultType.Reset:
|
||||||
raise ValueError('Unhandled result type')
|
raise ValueError('Unhandled result type')
|
||||||
|
|
||||||
header = f"{str(_('Subvolume name'))}: {name}\n"
|
header = f"{_('Subvolume name')}: {name}\n"
|
||||||
|
|
||||||
path = prompt_dir(
|
path = prompt_dir(
|
||||||
str(_("Subvolume mountpoint")),
|
str(_("Subvolume mountpoint")),
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ class GlobalMenu(AbstractMenu):
|
||||||
if network_config.type == NicType.MANUAL:
|
if network_config.type == NicType.MANUAL:
|
||||||
output = FormattedOutput.as_table(network_config.nics)
|
output = FormattedOutput.as_table(network_config.nics)
|
||||||
else:
|
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 output
|
||||||
return None
|
return None
|
||||||
|
|
@ -363,7 +363,7 @@ class GlobalMenu(AbstractMenu):
|
||||||
|
|
||||||
def _prev_uki(self, item: MenuItem) -> str | None:
|
def _prev_uki(self, item: MenuItem) -> str | None:
|
||||||
if item.value is not 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'))
|
output += str(_('Enabled')) if item.value else str(_('Disabled'))
|
||||||
return output
|
return output
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,6 @@ ignore = [
|
||||||
"E722", # bare-except
|
"E722", # bare-except
|
||||||
"PLW2901", # redefined-loop-name
|
"PLW2901", # redefined-loop-name
|
||||||
"RUF005", # collection-literal-concatenation
|
"RUF005", # collection-literal-concatenation
|
||||||
"RUF010", # explicit-f-string-type-conversion
|
|
||||||
"RUF012", # mutable-class-default
|
"RUF012", # mutable-class-default
|
||||||
"RUF015", # unnecessary-iterable-allocation-for-first-element
|
"RUF015", # unnecessary-iterable-allocation-for-first-element
|
||||||
"RUF039", # unraw-re-pattern
|
"RUF039", # unraw-re-pattern
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue