Skip to content

ConfigurationLoader is a poltergeist. #1100

@davidorme

Description

@davidorme

From @dalonsoa's review of #1093 - ConfigurationLoader is a poltergeist class (or at least, it does store diagnostic information about the loading process but we never actually use it in normal ve_run use).


You can equally do:

    config_object = get_configuration(ConfigurationLoader(...).data)

And save an unnecessary method.

Indeed, this kind of usage of classes where the generated object is directly ditched just after its creation, using ever a function or attribute of the object, is often considered an anti pattern. Why creating an object that you are not using anywhere else?

I would suggest you re-write this using normal functions, passing arguments as needed.

Originally posted by @dalonsoa in #1093 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions