@staticmethod
PYL-R0201 76 self.fsobjects: dict[str, Path] = {}
77 self.load_tree(Path(Path(sys.executable).anchor))
78
79 def safe_iterdir(self, path: Path) -> tuple[Path, ...] | tuple[()]: 80 """
81 Like `Path.iterdir()`, but do not raise on permission errors.
82 """
317 def change_appearance_mode_event(self, new_appearance_mode: str):
318 set_appearance_mode(new_appearance_mode)
319
320 def seperator(self, frame, side) -> None:321 seperator = CTkLabel(frame, text="|")
322 seperator.pack(side=f"{side}", padx=4, pady=2)
323 seperator.configure(width=2, font=("Arial", 16, "bold"), fg_color="transparent")
314 def open_settings_window(self):
315 self.settings = Settings(self)
316
317 def change_appearance_mode_event(self, new_appearance_mode: str):318 set_appearance_mode(new_appearance_mode)
319
320 def seperator(self, frame, side) -> None:
52 text_area.insert("1.0", file_content)
53 return new_tab
54
55 def read_file_content(self, filepath):56 with open(filepath, "r") as file:
57 content = file.read()
58 return content
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.