From 7fb52dbc668e633932d12fb2010bc16b1d44d967 Mon Sep 17 00:00:00 2001 From: Robyn Rindge Date: Thu, 5 Sep 2019 16:25:18 -0700 Subject: [PATCH] Added repr for SchemaDefs --- .../opentimelineio/schema/schemadef.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/py-opentimelineio/opentimelineio/schema/schemadef.py b/src/py-opentimelineio/opentimelineio/schema/schemadef.py index bda791a280..85c9fdb07f 100644 --- a/src/py-opentimelineio/opentimelineio/schema/schemadef.py +++ b/src/py-opentimelineio/opentimelineio/schema/schemadef.py @@ -34,6 +34,26 @@ def module(self): return self._module + def __str__(self): + return "SchemaDef({}, {}, {})".format( + repr(self.name), + repr(self.execution_scope), + repr(self.filepath) + ) + + def __repr__(self): + return ( + "otio.schema.SchemaDef(" + "name={}, " + "execution_scope={}, " + "filepath={}" + ")".format( + repr(self.name), + repr(self.execution_scope), + repr(self.filepath) + ) + ) + def available_schemadef_names(): """Return a string list of the available schemadefs."""