incorporate feedback

update documentation for core.py and automatic copyright year for docs
master
Emmanuelle Vargas-Gonzalez 2018-12-11 13:22:04 -05:00
parent 3f02925fc9
commit f12cc82d8a
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,4 @@
import datetime
import os import os
import re import re
import sys import sys
@ -32,7 +33,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
project = 'stix2' project = 'stix2'
copyright = '2017, OASIS Open' copyright = '{}, OASIS Open'.format(datetime.date.today().year)
author = 'OASIS Open' author = 'OASIS Open'
version = __version__ version = __version__

View File

@ -33,7 +33,8 @@ def parse(data, allow_custom=False, version=None):
into STIX objects, and will be returned as is. Default: False. into STIX objects, and will be returned as is. Default: False.
version (str): If present, it forces the parser to use the version version (str): If present, it forces the parser to use the version
provided. Otherwise, the library will make the best effort based provided. Otherwise, the library will make the best effort based
on checking the "spec_version" property. on checking the "spec_version" property. If none of the above are
possible, it will use the default version specified by the library.
Returns: Returns:
An instantiated Python STIX object. An instantiated Python STIX object.
@ -70,7 +71,8 @@ def dict_to_stix2(stix_dict, allow_custom=False, version=None):
Default: False. Default: False.
version (str): If present, it forces the parser to use the version version (str): If present, it forces the parser to use the version
provided. Otherwise, the library will make the best effort based provided. Otherwise, the library will make the best effort based
on checking the "spec_version" property. on checking the "spec_version" property. If none of the above are
possible, it will use the default version specified by the library.
Returns: Returns:
An instantiated Python STIX object An instantiated Python STIX object
@ -132,7 +134,8 @@ def parse_observable(data, _valid_refs=None, allow_custom=False, version=None):
allow_custom (bool): Whether to allow custom properties or not. allow_custom (bool): Whether to allow custom properties or not.
Default: False. Default: False.
version (str): If present, it forces the parser to use the version version (str): If present, it forces the parser to use the version
provided. Otherwise, the library will use the latest version. provided. Otherwise, the default version specified by the library
will be used.
Returns: Returns:
An instantiated Python STIX Cyber Observable object. An instantiated Python STIX Cyber Observable object.