From 3490fc85efc652f9f20dedd2c3dc6f5d1a2087e1 Mon Sep 17 00:00:00 2001 From: frostming Date: Fri, 9 Nov 2018 11:23:02 +0800 Subject: [PATCH] fix patch --- pipenv/vendor/tomlkit/container.py | 3 +-- .../patches/vendor/tomlkit-update-items.patch | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pipenv/vendor/tomlkit/container.py b/pipenv/vendor/tomlkit/container.py index 5ddd72e7..987a0790 100644 --- a/pipenv/vendor/tomlkit/container.py +++ b/pipenv/vendor/tomlkit/container.py @@ -196,8 +196,7 @@ class Container(dict): self._body[idx] = (None, Comment(Trivia(comment_ws="", comment=trivia.comment))) else: self._body[idx] = (None, Null()) - super(Container, self).__delitem__(key.key) - + super(Container, self).__delitem__(key.key) return self diff --git a/tasks/vendoring/patches/vendor/tomlkit-update-items.patch b/tasks/vendoring/patches/vendor/tomlkit-update-items.patch index 51f6006a..c996cb96 100644 --- a/tasks/vendoring/patches/vendor/tomlkit-update-items.patch +++ b/tasks/vendoring/patches/vendor/tomlkit-update-items.patch @@ -9,11 +9,11 @@ index 37014921..5ddd72e7 100644 +from .items import Trivia from .items import Whitespace from .items import item as _item - + @@ -189,9 +190,14 @@ class Container(dict): if idx is None: raise NonExistentKey(key) - + - self._body[idx] = (None, Null()) + old_data = self._body[idx][1] + trivia = getattr(old_data, "trivia", None) @@ -21,9 +21,8 @@ index 37014921..5ddd72e7 100644 + self._body[idx] = (None, Comment(Trivia(comment_ws="", comment=trivia.comment))) + else: + self._body[idx] = (None, Null()) -+ super(Container, self).__delitem__(key.key) - ++ super(Container, self).__delitem__(key.key) + - super(Container, self).__delitem__(key.key) - + return self -