Conversation
Codecov Report
@@ Coverage Diff @@
## master #1165 +/- ##
==========================================
- Coverage 95.61% 95.56% -0.06%
==========================================
Files 27 27
Lines 4648 4663 +15
Branches 588 591 +3
==========================================
+ Hits 4444 4456 +12
- Misses 134 136 +2
- Partials 70 71 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1165 +/- ##
==========================================
- Coverage 95.61% 95.55% -0.06%
==========================================
Files 27 27
Lines 4648 4657 +9
Branches 588 588
==========================================
+ Hits 4444 4450 +6
- Misses 134 136 +2
- Partials 70 71 +1
Continue to review full report at Codecov.
|
chalice/app.py
Outdated
|
|
||
| def __getitem__(self, k): | ||
| values_list = self._dict[k] | ||
| def add(self, k, v): |
There was a problem hiding this comment.
Ah a stub I forgot. Initially it was going to be https://werkzeug.palletsprojects.com/en/0.15.x/datastructures/#werkzeug.datastructures.MultiDict.add
Since there is no other way to add a new value to an internal list, other than getting it, appending and resetting. Initially I was going to use it during __init__ when creating the internal structure from a list of tuples. However it was awkward since the internal map hasn't been initialized so I opted to write it all out there in the __init__ method so there is no real reason to have it, since it didn't exist before. I just forgot to remove the stub.
046f987 to
e32d71e
Compare
kyleknap
left a comment
There was a problem hiding this comment.
Looks good. 🚢 Make sure to add a changelog as well.
tests/unit/test_app.py
Outdated
| pop_result = d.pop(key) | ||
| assert popped == pop_result | ||
|
|
||
| print(d._dict) |
56f0bb1 to
e3b53f7
Compare
kyleknap
left a comment
There was a problem hiding this comment.
Should be good to merge
fixes #1158
Make
MultiDictmutable again. The initial pull request made it readonly which is not backwards compatible with the rawdictit used to be.