From 8f6538e22e1cf90b961a53fe8b3eefb2bb74e824 Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:17:50 +0200 Subject: [PATCH] refactor: rename variables --- qt/aqt/editor.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 65f87c26c..674b09274 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -295,6 +295,8 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too disables: bool = True, rightside: bool = True, ) -> str: + title_attribute = tip + if icon: if icon.startswith("qrc:/"): iconstr = icon @@ -311,22 +313,22 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too else: label_element = "" - idstr = f"id={id}" if id else "" - toggleScript = "toggleEditorButton(this);" if toggleable else "" + id_attribute_assignment = f"id={id}" if id else "" + cmd_to_toggle_button = "toggleEditorButton(this);" if toggleable else "" - tip = shortcut(tip) + title_attribute = shortcut(title_attribute) - class_ = "linkb" if rightside else "rounded" + class_attribute = "linkb" if rightside else "rounded" if not disables: - class_ += " perm" + class_attribute += " perm" return f"""