You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 1. The function name is difficult to interpret.def_populate_first_tasks_python_name_command_id_map(self):
ifnotself._initial_task_python_names_map:
## 2. Iterating over dir instead of the relevant list of names.## dir() is for users.forcommandindir(self._command_source):
## 3. Require more systematic way to filter out unwanted names## than mentioning SwitchToSolution explicitly.ifcommandin ["SwitchToSolution", "set_state"]:
continuecommand_obj=getattr(self._command_source, command)
ifisinstance(command_obj, PyCommand):
command_obj_instance=command_obj.create_instance()
ifnotcommand_obj_instance.get_attr("requiredInputs"):
## 4. Going forward, this call is happening too late. The static info## shall already indicate the API names, and if this code picks up the names## differently then we will have already failed by this point.help_str=command_obj_instance.get_attr(
"APIName"
) orcommand_obj_instance.get_attr("helpString")
ifhelp_str:
self._initial_task_python_names_map[help_str] =commanddelcommand_obj_instance
The text was updated successfully, but these errors were encountered:
seanpearsonuk
changed the title
rwefactor _populate_first_tasks_python_name_command_id_map
refactor _populate_first_tasks_python_name_command_id_map
Oct 28, 2024
The text was updated successfully, but these errors were encountered: