Team Ai
Datasetpublic

Benjamin-eecs/openrsi-commit-runtime-assets

sourceHugging Faceupdated 16d agoView on Hugging Face
0likes168downloads
patch.diff20 linesDownload Raw Back to solution
1diff --git a/confuse/templates.py b/confuse/templates.py2index 1afa92b..f18f34e 1006443--- a/confuse/templates.py4+++ b/confuse/templates.py5@@ -180,6 +180,14 @@ class Sequence(Template):6     def value(self, view, template=None):7         """Get a list of items validated against the template.8         """9+        try:10+            collection, _ = view.first()11+        except exceptions.NotFoundError:12+            pass13+        else:14+            if not isinstance(collection, (list, tuple)):15+                self.fail(u'must be a list', view, True)16+17         out = []18         for item in view:19             out.append(self.subtemplate.value(item, self))20