forked from Mirror/pmbootstrap
pmb: Replace list(...)[0] with next(iter(...)) (MR 2525)
See https://docs.astral.sh/ruff/rules/unnecessary-iterable-allocation-for-first-element
This commit is contained in:
parent
752c1df039
commit
c2787aa76f
2 changed files with 3 additions and 3 deletions
|
@ -399,7 +399,7 @@ def ask_for_device_kernel(config: Config, device: str) -> str:
|
|||
# Get default
|
||||
default = config.kernel
|
||||
if default not in kernels:
|
||||
default = list(kernels.keys())[0]
|
||||
default = next(iter(kernels.keys()))
|
||||
|
||||
# Ask for kernel (extra message when downstream and upstream are available)
|
||||
logging.info("Which kernel do you want to use with your device?")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue