desy-ml/cheetah

Unsused instances and imports of UniqueNameGenerator

Hespe opened this issue · 1 comments

In many element classes, there are unused instances and imports of UniqueNameGenerator, e.g. in

generate_unique_name = UniqueNameGenerator(prefix="unnamed_element")
since the names are generated in the superclass Element.

The unused instances could either be removed or changed to a more specific prefix and employed for overwriting the generic unique name from Element.

Good point. I thought about class-specific prefixes at some point in the past, but then didn't do it for some reason. I don't remember why. I tried to find an issue where I may have written this down, but didn't find one.

Right now I'm inclined to vote for removing the unsung instances. It's the simpler solution, but I don't know if it's the better one.

@cr-xu, do you have thoughts on this?