Skip to content

Config values should be contyext managers #71

Description

@johny-b
with Config.set_value("timeout", 10):
    # do your stuff
# here we're back to the old value

This doesn't matter for cases where we have a single script. But when we have many components, in different files, doing different things and maybe using different config values, this is very important.

Also, can we easily make this thread-safe?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions