Add docstring for enumerate_types()

master
Desai, Kartikey H 2019-12-05 17:09:55 -05:00 committed by Chris Lenk
parent f09cf4867d
commit 54ecba736d
1 changed files with 8 additions and 0 deletions

View File

@ -477,6 +477,14 @@ class ReferenceProperty(Property):
def enumerate_types(types, spec_version):
"""
`types` is meant to be a list; it may contain specific object types and/or
the any of the words "SCO", "SDO", or "SRO"
Since "SCO", "SDO", and "SRO" are general types that encompass various specific object types,
once each of those words is being processed, that word will be removed from `return_types`,
so as not to mistakenly allow objects to be created of types "SCO", "SDO", or "SRO"
"""
return_types = []
return_types += types