mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-06-18 18:52:52 +02:00
naming Functions
This commit is contained in:
@ -232,3 +232,15 @@ def locate_and_import_class(class_name, folder_path: Union[str, PurePath] = ''):
|
||||
except AttributeError:
|
||||
continue
|
||||
raise AttributeError(f'Class "{class_name}" was not found in "{folder_path.name}"', list(set(all_found_modules)))
|
||||
|
||||
|
||||
def add_bound_name(name_str, bound_e):
|
||||
return f'{name_str}({bound_e.identifier})'
|
||||
|
||||
|
||||
def add_pos_name(name_str, bound_e):
|
||||
if bound_e.var_has_pos:
|
||||
return f'{name_str}({bound_e.pos})'
|
||||
return name_str
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user