mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-21 07:10:58 +00:00
6e463c3cb0
- Move patches to separate subdirectories - Refactor vendoring scripts Signed-off-by: Dan Ryan <dan@danryan.co>
29 lines
871 B
Diff
29 lines
871 B
Diff
diff --git a/pipenv/patched/contoml/file/file.py b/pipenv/patched/contoml/file/file.py
|
|
index 5033a7b..99ce148 100644
|
|
--- a/pipenv/patched/contoml/file/file.py
|
|
+++ b/pipenv/patched/contoml/file/file.py
|
|
@@ -30,6 +30,14 @@ class TOMLFile:
|
|
except KeyError:
|
|
return FreshTable(parent=self, name=item, is_array=False)
|
|
|
|
+ def get(self, item, default=None):
|
|
+ """This was not here for who knows why."""
|
|
+
|
|
+ if item not in self:
|
|
+ return default
|
|
+ else:
|
|
+ return self.__getitem__(item)
|
|
+
|
|
def __contains__(self, item):
|
|
return item in self.keys()
|
|
|
|
@@ -223,7 +231,7 @@ class TOMLFile:
|
|
if has_anonymous_entry():
|
|
return items
|
|
else:
|
|
- return items + [('', self[''])]
|
|
+ return list(items) + [('', self[''])]
|
|
|
|
@property
|
|
def primitive(self):
|