Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Lelaquais committed Oct 18, 2023
1 parent d81632f commit e849d2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/taipy/gui/builder/_api_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def add_default(self):
current_frame = inspect.currentframe()
error_message = "Cannot generate elements API for the current module"
if current_frame is None:
raise RuntimeError("{error_message}: No frame found.")
raise RuntimeError(f"{error_message}: No frame found.")
if current_frame.f_back is None:
raise RuntimeError("{error_message}: taipy-gui module not found.")
raise RuntimeError(f"{error_message}: taipy-gui module not found.")
module_name = current_frame.f_back.f_globals["__name__"]
self.__module = module = sys.modules[module_name]
with open(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "viselements.json"))) as viselements:
data = json.load(viselements)
if "blocks" not in data or "controls" not in data:
raise RuntimeError("{error_message}: Invalid viselements.json file.")
raise RuntimeError(f"{error_message}: Invalid viselements.json file.")
for blockElement in data["blocks"]:
default_property = _ElementApiGenerator.find_default_property(blockElement[1]["properties"])
setattr(
Expand Down

0 comments on commit e849d2d

Please sign in to comment.