ipython / ipython/traitlets

using traitlets.config.get_config() in python config file breaks load_config_file

Abierto
#379 4 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
653
Forks
217
Merge medio
2 d 21 h
PR fusionados (30 d)
2

Descripción

I put these lines at the top of a python config file:

from traitlets.config import get_config

c = get_config()

I did this so my editor would stop bugging me about c or get_config not being defined.

Unfortunately, this subtly broke load_config_file, because that sets up global with `get_config` and `c`, both of which I just accidentally destroyed.

I suggest that in the comments that are automatically generated when generate_config_file is used, a very explicit warning be placed to guard against this. Or perhaps there's some way to check if get_config or c has been mangled/modified accidentally

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.