85 self, color=get_accent_color()
86 ) # Change header color to accent color
87 self.iconbitmap(icon) # Set the icon for the editor
88 menubar = Menubar(self) 89 elif os.name == "posix":
90 menubar = Menubar(self)
91
249
250 # All buttons and search bar in the top frame for different functions (Right)
251 def open_settings_window():
252 settings = Settings(root)253
254 settings_button = C.CTkButton(top_frame, text="⚙️", command=open_settings_window)
255 settings_button.pack(side="right", padx=5, pady=10)
171 tab_view = TabView(right_frame, screen_width, screen_height)
172 welcome_tab = WelcomeScreen(tab_view.tab_view)
173 tab_init = Workspace(tab_view.tab_view)
174 Codeview = Codespace(tab_view.tab_view)175
176 # All Items for the left frame are below :
177 Filetree_Button = C.CTkLabel(
170 # Tab management, welcome screen and workspace, codespace
171 tab_view = TabView(right_frame, screen_width, screen_height)
172 welcome_tab = WelcomeScreen(tab_view.tab_view)
173 tab_init = Workspace(tab_view.tab_view)174 Codeview = Codespace(tab_view.tab_view)
175
176 # All Items for the left frame are below :
169
170 # Tab management, welcome screen and workspace, codespace
171 tab_view = TabView(right_frame, screen_width, screen_height)
172 welcome_tab = WelcomeScreen(tab_view.tab_view)173 tab_init = Workspace(tab_view.tab_view)
174 Codeview = Codespace(tab_view.tab_view)
175
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()