Make MarkingsMixin private
Partially so it doesn't clog up the markings API documentation.stix2.1
parent
8b702c6985
commit
9ea4344ca7
|
@ -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([
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue