Closed 0xDEC0DE closed 8 months ago
It's easiest to reproduce with Flask:
echo 'THIS_IS_PROBLEMATIC = "^.*reg\.ex$"' > test.conf
"expected" = prints filename, line number, and offending bit of code on warnings.
import flask
app = flask.Flask(__name__)
app.config.from_pyfile("test.conf")
import flask
import soufi
app = flask.Flask(__name__)
app.config.from_pyfile("test.conf")
The Yum and Alpine finders both do this in order to "pretty up" their warning messages:
Unfortunately, this setting is global, and affects whatever application soufi is imported into.
Libraries should not be fidgeting with such things, they should just raise the warning and let the parent application worry about the formatting.