📝[Refactor] ruffを使用しコード検証修正を行った
This commit is contained in:
@@ -233,7 +233,8 @@ class _CreateConfirmationModal(CTkToplevel):
|
||||
self.grab_release()
|
||||
|
||||
def focusOutFunction(self, e):
|
||||
if str(e.widget) != ".!_createconfirmationmodal": return
|
||||
if str(e.widget) != ".!_createconfirmationmodal":
|
||||
return
|
||||
callFunctionIfCallable(self._view_variable.CALLBACK_HIDE_CONFIRMATION_MODAL)
|
||||
|
||||
def _grab_set(self):
|
||||
|
||||
@@ -262,7 +262,8 @@ class _CreateDropdownMenuWindow(CTkToplevel):
|
||||
|
||||
|
||||
def show(self, dropdown_menu_widget_id):
|
||||
if self.hide is False: return
|
||||
if self.hide is False:
|
||||
return
|
||||
self.wm_attributes("-alpha", 0)
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ class _CreateErrorWindow(CTkToplevel):
|
||||
|
||||
|
||||
def show(self, target_widget):
|
||||
if self.hide is False: return
|
||||
if self.hide is False:
|
||||
return
|
||||
|
||||
self.attach_widget = target_widget
|
||||
|
||||
|
||||
@@ -178,5 +178,6 @@ class _CreateSelectableLanguagesWindow(CTkToplevel):
|
||||
|
||||
|
||||
def focusOutFunction(self, e):
|
||||
if str(e.widget) != ".!_createselectablelanguageswindow": return
|
||||
if str(e.widget) != ".!_createselectablelanguageswindow":
|
||||
return
|
||||
self.vrct_gui._closeSelectableLanguagesWindow()
|
||||
@@ -2,7 +2,7 @@ from functools import partial
|
||||
from types import SimpleNamespace
|
||||
from typing import Union
|
||||
|
||||
from customtkinter import CTkOptionMenu, CTkFont, CTkFrame, CTkLabel, CTkRadioButton, CTkEntry, CTkSlider, CTkSwitch, CTkCheckBox, CTkProgressBar, CTkImage
|
||||
from customtkinter import CTkFont, CTkFrame, CTkLabel, CTkEntry, CTkSlider, CTkSwitch, CTkCheckBox, CTkProgressBar, CTkImage
|
||||
from CTkToolTip import *
|
||||
|
||||
from vrct_gui.ui_utils import createButtonWithImage, getLatestWidth, createOptionMenuBox, getLatestHeight, bindButtonFunctionAndColor
|
||||
@@ -1068,7 +1068,8 @@ class _SettingBoxGenerator():
|
||||
items[i] = item_data
|
||||
is_replaced = True
|
||||
break
|
||||
if is_replaced is False: items.append(item_data)
|
||||
if is_replaced is False:
|
||||
items.append(item_data)
|
||||
|
||||
|
||||
return mic_word_filter_item_wrapper
|
||||
|
||||
@@ -2,7 +2,7 @@ from functools import partial
|
||||
|
||||
from customtkinter import CTkFont, CTkFrame, CTkLabel, CTkSwitch, CTkImage
|
||||
|
||||
from ....ui_utils import openImageKeepAspectRatio, retag, getLatestHeight, bindEnterAndLeaveFunction, bindButtonReleaseFunction, bindButtonPressAndReleaseFunction
|
||||
from ....ui_utils import openImageKeepAspectRatio, retag, bindEnterAndLeaveFunction, bindButtonReleaseFunction, bindButtonPressAndReleaseFunction
|
||||
|
||||
from utils import callFunctionIfCallable
|
||||
|
||||
|
||||
@@ -162,10 +162,12 @@ def createOptionMenuBox(parent_widget, optionmenu_bg_color, optionmenu_hovered_b
|
||||
option_menu_box = CTkFrame(parent_widget, corner_radius=6, fg_color=optionmenu_bg_color, cursor="hand2")
|
||||
|
||||
option_menu_box.grid_rowconfigure(0, weight=1)
|
||||
if optionmenu_min_height is not None: option_menu_box.grid_rowconfigure(0, minsize=optionmenu_min_height)
|
||||
if optionmenu_min_height is not None:
|
||||
option_menu_box.grid_rowconfigure(0, minsize=optionmenu_min_height)
|
||||
|
||||
option_menu_box.grid_columnconfigure(0, weight=1)
|
||||
if optionmenu_min_width is not None: option_menu_box.grid_columnconfigure(0, minsize=optionmenu_min_width)
|
||||
if optionmenu_min_width is not None:
|
||||
option_menu_box.grid_columnconfigure(0, minsize=optionmenu_min_width)
|
||||
|
||||
optionmenu_label_wrapper = CTkFrame(option_menu_box, corner_radius=0, fg_color=optionmenu_bg_color)
|
||||
optionmenu_label_wrapper.grid(row=0, column=0, padx=(optionmenu_ipadx[0],0), pady=optionmenu_ipady, sticky="ew")
|
||||
|
||||
@@ -269,7 +269,7 @@ class VRCT_GUI(CTk):
|
||||
def _clearErrorMessage(self):
|
||||
try:
|
||||
self.error_message_window._withdraw()
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user