-
Notifications
You must be signed in to change notification settings - Fork 3
Description
In usethis._config.usethis_config we keep global state which changes the application behaviour, e.g. whether some categories of messages are suppressed, whether we should run in offline mode, etc.
This can be used as a context manager to temporarily over-ride the global state.
The command line interface can also set some of these global settings via flags (again, via the context manager).
Discussing this in CONTRIBUTING.md under the architecture section would be good.
The main purpose of this is to avoid pass-through variables. In copilot-instructions.md we need to make it clear that it is not acceptable to add new global state unless there is a very good reason and the state is useful across many different commands, across the whole application. The purpose is to control application behaviour, not the specific behaviour of one command in the CLI.