Skip to content

Commit

Permalink
Updating the name of PlanCollectorSub classes to include the parent name
Browse files Browse the repository at this point in the history
  • Loading branch information
awalter-bnl committed Jun 25, 2024
1 parent 95a2cf4 commit ffe018a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified src/ari_sxn_common/__pycache__/common_bluesky.cpython-312.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions src/ari_sxn_common/common_bluesky.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class PlanCollectorSub:
"""
A class used to initialize child attributes with methods
A class used to initialize child attributes with methods for PlanCollector's
This class is to be used with the `PlanCollector` class when you want to add
an extra level of plans that contain no child collections, only child plans.
Expand All @@ -56,7 +56,7 @@ def __init__(self, methods_to_import, name, parent):
for plan_name, function in methods_to_import.items():
setattr(self, plan_name, function)

self.name = name
self.name = f'{parent.name}.{name}'
self.parent = parent

def __str__(self):
Expand All @@ -71,7 +71,7 @@ def __str__(self):
output: str
A formatted string that should be printed when using print(self)
"""
output = f'\n{self.parent.name}.{self.name}:'
output = f'\n{self.name}:'
for name in self.__dict__.keys():
if name not in ['name', 'parent']:
output += f'\n {name}'
Expand Down

0 comments on commit ffe018a

Please sign in to comment.