Wokia-Dev / EzFractal

Inconsistent return statements PYL-R1710
Style
Minor
a year agoa year old
Either all return statements in a function should return an expression, or none of them should.
 28        print(f"Error loading EzToggle data from {file_path}: {e}")
 29
 30
 31def check_ez_toggle_event(toggle_list, mouse_x, mouse_y): 32    # Check if mouse is hovering over any toggle
 33    for toggle in toggle_list:
 34        if toggle.check_hover(mouse_x, mouse_y):
Either all return statements in a function should return an expression, or none of them should.
  4from UI.Components.EzComponent import EzComponent
  5
  6
  7def loader(file_path):  8    # Load EzToggle data from json file
  9    try:
 10        with open(file_path, "r", encoding="utf-8") as f:
Either all return statements in a function should return an expression, or none of them should.
  5from UI.Components.EzComponent import EzComponent
  6
  7
  8def loader(file_path):  9    # Load EzTextField data from json file
 10    try:
 11        with open(file_path, "r", encoding="utf-8") as f:
Either all return statements in a function should return an expression, or none of them should.
 3from UI.Components.EzComponent import EzComponent
 4
 5
 6def loader(file_path): 7    # Load EzText data from json file
 8    try:
 9        with open(file_path, "r", encoding="utf-8") as f:
Either all return statements in a function should return an expression, or none of them should.
 10from UI.Components.EzComponent import EzComponent
 11
 12
 13def loader(file_path: str): 14    # Load EzScrollView data from json file
 15    try:
 16        with open(file_path, "r", encoding="utf-8") as f: