-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making it possible to fail on unknown keys in [project]
table
#505
Comments
I think warning makes sense at least. I think I tried to start a discussion when the PEP was being discussed about whether backends should actually error on unexpected keys, but it didn't really get anywhere. |
I guess... it depends on what "improperly specified" means? :P None the less, we should definitely add a warning for these things. |
Ok, it seem that my installation of lit was just borked as it should already do it... Not sure what is/was wrong. |
flit/flit_core/flit_core/config.py Lines 410 to 411 in c479f66
What @Carreau is referring to, I believe. |
Yeah, and I've been scratching my head with a project that had So let's change this request for maybe: would it be ok to have a
turn the warning into error ? |
[project]
table
The 'improperly specified' thing almost seems tautological. OK, we'll raise an error if it's wrong, but is an extra key wrong? Might the spec be extended in the future? And if so, will the extensions be optional extras which you can ignore without it really mattering, or will we need them to be handled? Honestly, I'd be happy enough to decide the warning was a mistake and it should just be an error, without adding a new option. If/when new fields are added, Flit should add support for them and people should depend on the relevant minimum version of |
I'm tempted to make it and error as well, it's easier to make it stricter early than later. |
Likewise. I think it's better to error out on unknown keys here.
It might, and then you'll need a newer version of flit to handle them if they're specified. If they're not specified, then... well... we can indeed just consume that. :) Overall though, I don't think there's much churn anticipated for the |
OK, who wants to do a PR? 🙂 |
J'ai un draft de la faire configurable. |
As a draft, config, and naming to discuss. I'm tempted to make it strict by default, and have the option to ignore if ever there are extra keys added. Closes pypa#505
As a draft, config, and naming to discuss. I'm tempted to make it strict by default, and have the option to ignore if ever there are extra keys added. Closes pypa#505
I just scratched my head for 30 minutes because of a typo.
Do @takluyver think it could be ok to warn on extra keys ?
The text was updated successfully, but these errors were encountered: