mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Vendored
+2
-2
@@ -193,11 +193,11 @@ class Container(dict):
|
||||
old_data = self._body[idx][1]
|
||||
trivia = getattr(old_data, "trivia", None)
|
||||
if trivia and getattr(trivia, "comment", None):
|
||||
self._body[idx] = (None, trivia)
|
||||
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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/pipenv/vendor/tomlkit/container.py b/pipenv/vendor/tomlkit/container.py
|
||||
index 37014921..a425cf79 100644
|
||||
index 37014921..5ddd72e7 100644
|
||||
--- a/pipenv/vendor/tomlkit/container.py
|
||||
+++ b/pipenv/vendor/tomlkit/container.py
|
||||
@@ -9,6 +9,7 @@ from .items import Item
|
||||
@@ -10,7 +10,7 @@ index 37014921..a425cf79 100644
|
||||
from .items import Whitespace
|
||||
from .items import item as _item
|
||||
|
||||
@@ -189,7 +190,12 @@ class Container(dict):
|
||||
@@ -189,9 +190,14 @@ class Container(dict):
|
||||
if idx is None:
|
||||
raise NonExistentKey(key)
|
||||
|
||||
@@ -18,9 +18,12 @@ index 37014921..a425cf79 100644
|
||||
+ old_data = self._body[idx][1]
|
||||
+ trivia = getattr(old_data, "trivia", None)
|
||||
+ if trivia and getattr(trivia, "comment", None):
|
||||
+ self._body[idx] = (None, Trivia(comment_ws="", comment=trivia.comment))
|
||||
+ 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user