From 54ecba736d04569086f21a403a084af0db5af6e5 Mon Sep 17 00:00:00 2001 From: "Desai, Kartikey H" Date: Thu, 5 Dec 2019 17:09:55 -0500 Subject: [PATCH] Add docstring for enumerate_types() --- stix2/properties.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stix2/properties.py b/stix2/properties.py index 8418f71..9ddfb82 100644 --- a/stix2/properties.py +++ b/stix2/properties.py @@ -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