From a97645abc307d9320076e3070b3d7e6e8c597aff Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Mon, 24 Aug 2020 17:04:56 -0400 Subject: [PATCH] Add some missing docstrings on a few exception classes. --- stix2/exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stix2/exceptions.py b/stix2/exceptions.py index 2dc0d15..92e7e68 100644 --- a/stix2/exceptions.py +++ b/stix2/exceptions.py @@ -176,6 +176,9 @@ class ImmutableError(STIXError): class VersioningError(STIXError): + """ + Base class for object versioning errors. + """ pass @@ -192,6 +195,10 @@ class UnmodifiablePropertyError(VersioningError): class TypeNotVersionableError(VersioningError): + """ + An object couldn't be versioned because it lacked the versioning properties + and its type does not support them. + """ def __init__(self, obj): if isinstance(obj, dict): type_name = obj.get("type") @@ -209,6 +216,10 @@ class TypeNotVersionableError(VersioningError): class ObjectNotVersionableError(VersioningError): + """ + An object's type supports versioning, but the object couldn't be versioned + because it lacked sufficient versioning properties. + """ def __init__(self, obj): self.object = obj