Fix docstring typo in is_marking(). Made a minor docstring

update to is_sro() as well, so it doesn't talk as if you can
register custom SROs.  That didn't actually make sense.
pull/1/head
Michael Chisholm 2021-01-27 22:25:41 -05:00
parent f9b9e0d2d7
commit eead72aabc
1 changed files with 8 additions and 8 deletions

View File

@ -449,10 +449,10 @@ def is_sro(value, stix_version=stix2.version.DEFAULT_VERSION):
""" """
Determine whether the given object, type, or ID is/is for an SRO of the Determine whether the given object, type, or ID is/is for an SRO of the
given STIX version. If value is a type or ID, this just checks whether given STIX version. If value is a type or ID, this just checks whether
the type was registered as an SRO in the given STIX version. If a mapping, the type is an SRO in the given STIX version. If a mapping, *simple* STIX
*simple* STIX version inference is additionally done on the value, and the version inference is additionally done on the value, and the result is
result is checked against stix_version. It does not attempt to fully checked against stix_version. It does not attempt to fully validate the
validate the value. value.
:param value: A mapping with a "type" property, or a STIX ID or type :param value: A mapping with a "type" property, or a STIX ID or type
as a string as a string
@ -510,10 +510,10 @@ def is_marking(value, stix_version=stix2.version.DEFAULT_VERSION):
""" """
Determine whether the given object, type, or ID is/is for an marking Determine whether the given object, type, or ID is/is for an marking
definition of the given STIX version. If value is a type or ID, this just definition of the given STIX version. If value is a type or ID, this just
checks whether the type was registered as an SDO in the given STIX version. checks whether the type is "marking-definition". If a mapping, *simple*
If a mapping, *simple* STIX version inference is additionally done on the STIX version inference is additionally done on the value, and the result
value, and the result is checked against stix_version. It does not attempt is checked against stix_version. It does not attempt to fully validate the
to fully validate the value. value.
:param value: A STIX object, object ID, or type as a string. :param value: A STIX object, object ID, or type as a string.
:param stix_version: A STIX version as a string :param stix_version: A STIX version as a string