diff --git a/stix2/common.py b/stix2/common.py index 602e43f..449cd54 100644 --- a/stix2/common.py +++ b/stix2/common.py @@ -3,7 +3,7 @@ from collections import OrderedDict from .base import _STIXBase -from .markings import MarkingsMixin +from .markings import _MarkingsMixin from .properties import (HashesProperty, IDProperty, ListProperty, Property, ReferenceProperty, SelectorProperty, StringProperty, TimestampProperty, TypeProperty) @@ -77,7 +77,7 @@ class MarkingProperty(Property): raise ValueError("must be a Statement, TLP Marking or a registered marking.") -class MarkingDefinition(_STIXBase, MarkingsMixin): +class MarkingDefinition(_STIXBase, _MarkingsMixin): _type = 'marking-definition' _properties = OrderedDict() _properties.update([ diff --git a/stix2/markings/__init__.py b/stix2/markings/__init__.py index 7c45b5a..4038a5e 100644 --- a/stix2/markings/__init__.py +++ b/stix2/markings/__init__.py @@ -224,14 +224,14 @@ def is_marked(obj, marking=None, selectors=None, inherited=False, descendants=Fa return result -class MarkingsMixin(): +class _MarkingsMixin(): pass # Note that all of these methods will return a new object because of immutability -MarkingsMixin.get_markings = get_markings -MarkingsMixin.set_markings = set_markings -MarkingsMixin.remove_markings = remove_markings -MarkingsMixin.add_markings = add_markings -MarkingsMixin.clear_markings = clear_markings -MarkingsMixin.is_marked = is_marked +_MarkingsMixin.get_markings = get_markings +_MarkingsMixin.set_markings = set_markings +_MarkingsMixin.remove_markings = remove_markings +_MarkingsMixin.add_markings = add_markings +_MarkingsMixin.clear_markings = clear_markings +_MarkingsMixin.is_marked = is_marked diff --git a/stix2/sdo.py b/stix2/sdo.py index c3eb619..eaeef10 100644 --- a/stix2/sdo.py +++ b/stix2/sdo.py @@ -6,7 +6,7 @@ import stix2 from .base import _STIXBase from .common import ExternalReference, GranularMarking, KillChainPhase -from .markings import MarkingsMixin +from .markings import _MarkingsMixin from .observables import ObservableProperty from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty, PatternProperty, ReferenceProperty, @@ -14,7 +14,7 @@ from .properties import (BooleanProperty, IDProperty, IntegerProperty, from .utils import NOW -class STIXDomainObject(_STIXBase, MarkingsMixin): +class STIXDomainObject(_STIXBase, _MarkingsMixin): pass diff --git a/stix2/sro.py b/stix2/sro.py index 4fa0465..60f99f5 100644 --- a/stix2/sro.py +++ b/stix2/sro.py @@ -4,14 +4,14 @@ from collections import OrderedDict from .base import _STIXBase from .common import ExternalReference, GranularMarking -from .markings import MarkingsMixin +from .markings import _MarkingsMixin from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty, ReferenceProperty, StringProperty, TimestampProperty, TypeProperty) from .utils import NOW -class STIXRelationshipObject(_STIXBase, MarkingsMixin): +class STIXRelationshipObject(_STIXBase, _MarkingsMixin): pass