Skip to content

[bug] reload() function does not clear old hooks #850

@iTaybb

Description

@iTaybb

Describe the bug
the reload() function of the LazySettings class does not clear the _loaded_hooks attribute. Because of that, when trying to reload and rerun the loaders, the hook won't run again.

To Reproduce
Steps to reproduce the behavior:

Configure a post hook just like in the docs. Create a DynaConf object and then run reload() on the object.

Expected behavior
The post hook should run after every reload.

Additional context
I'll be glad to make a PR for this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions