Fixing requirements object not iterable on bad schema.#393
Fixing requirements object not iterable on bad schema.#393nicholasks wants to merge 2 commits intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #393 +/- ##
=======================================
Coverage 94.20% 94.21%
=======================================
Files 11 11
Lines 1157 1159 +2
=======================================
+ Hits 1090 1092 +2
Misses 67 67
Continue to review full report at Codecov.
|
rafaelpivato
left a comment
There was a problem hiding this comment.
We had something like this happening before and fixed with #395. We certainly need better schema validation for our configuration file. Do you have suggestions?
If you don't want to bring that with this PR, I would just urge you to consider, besides an empty None value for requirements, what could happen if someone adds unwelcome or unwanted types, like hashes instead of lists, integers instead of strings and so on.
This will avoid raise "'NoneType' object is not iterable" error when user has a bad schema regarding
requirements.txton.pyup.ymlfile.Example schema that was triggering the error:
Should we warn users about the bad schema? And how about the documentation (.pyup.yml example file), maybe the "default empty" is leading users to do that, and I think is in certain way controversial, since below says "allowed: list".