One thing I realized in implementing #74 in docs is it's really handy to be able to set the environment - specifically, pop the NO_COLOR variable and push the FORCE_COLOR (or PYTHON_COLORS, but the later is more general). You can do it apparently inside conf.py, but that might have side effects, like affecting logging output. You can also do it in a task runner like nox. Those are fine for now, but maybe it could be improved. Thoughts:
Maybe the config setting could set these for you? Enabling ANSI but then getting different doc outputs based on the value of NO_COLOR could be problematic. And since this isn't a terminal, FORCE_COLOR is usually needed to use it.
Or maybe there could be either a config setting or a local setting to manually set environment variables? Ideally this would also support removing variables like NO_COLOR (which doesn't have a set-to-empty check according to the standard!).
Or maybe both, a default plus a way to set variables.
One thing I realized in implementing #74 in docs is it's really handy to be able to set the environment - specifically, pop the NO_COLOR variable and push the FORCE_COLOR (or PYTHON_COLORS, but the later is more general). You can do it apparently inside
conf.py, but that might have side effects, like affecting logging output. You can also do it in a task runner like nox. Those are fine for now, but maybe it could be improved. Thoughts:Maybe the config setting could set these for you? Enabling ANSI but then getting different doc outputs based on the value of NO_COLOR could be problematic. And since this isn't a terminal,
FORCE_COLORis usually needed to use it.Or maybe there could be either a config setting or a local setting to manually set environment variables? Ideally this would also support removing variables like
NO_COLOR(which doesn't have a set-to-empty check according to the standard!).Or maybe both, a default plus a way to set variables.