From 73ceb0c99d653b1d4c651ab909eea7011ac0799d Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Sat, 22 Nov 2025 05:15:41 -0500 Subject: [PATCH] Use ClassVar to avoid mutable-class-default (RUF012) warnings (#3942) --- archinstall/tui/ui/components.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archinstall/tui/ui/components.py b/archinstall/tui/ui/components.py index 4a7c5d06..0eb7254c 100644 --- a/archinstall/tui/ui/components.py +++ b/archinstall/tui/ui/components.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Awaitable, Callable -from typing import Any, TypeVar, override +from typing import Any, ClassVar, TypeVar, override from textual import work from textual.app import App, ComposeResult @@ -20,7 +20,7 @@ ValueT = TypeVar('ValueT') class BaseScreen(Screen[Result[ValueT]]): - BINDINGS = [ # noqa: RUF012 + BINDINGS: ClassVar = [ Binding('escape', 'cancel_operation', 'Cancel', show=True), Binding('ctrl+c', 'reset_operation', 'Reset', show=True), ] @@ -97,7 +97,7 @@ class LoadingScreen(BaseScreen[None]): class ConfirmationScreen(BaseScreen[ValueT]): - BINDINGS = [ # noqa: RUF012 + BINDINGS: ClassVar = [ Binding('l', 'focus_right', 'Focus right', show=True), Binding('h', 'focus_left', 'Focus left', show=True), Binding('right', 'focus_right', 'Focus right', show=True), @@ -317,7 +317,7 @@ class InputScreen(BaseScreen[str]): class TableSelectionScreen(BaseScreen[ValueT]): - BINDINGS = [ # noqa: RUF012 + BINDINGS: ClassVar = [ Binding('j', 'cursor_down', 'Down', show=True), Binding('k', 'cursor_up', 'Up', show=True), ]