-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
I am not a fan of this:
r_qoi_list = ["work"]
with open(os.path.join(target_dir, rank_script_name), 'r', encoding="utf-8") as f:
lines = f.readlines()
for line in lines:
if line[8:12] == "get_":
r_qoi_list.append(line[12:line.find("(")])
# Create list of all Object QOI (Object.get_*)
o_qoi_list = []
with open(os.path.join(target_dir, object_script_name), 'r', encoding="utf-8") as f:
lines = f.readlines()
for line in lines:
if line[8:12] == "get_":
o_qoi_list.append(line[12:line.find("(")])Loading the text of a code file and then using a regex to search a file to match a function name is not the way to solve this.
The plan is to re-implement this cleanly with decorators and allow the user to specify exactly which functions should be QOIs.
Metadata
Metadata
Assignees
Labels
No labels