From 479cff818abae2ede8fae9b170b924e4062d2563 Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Fri, 19 Feb 2021 22:15:11 -0500 Subject: [PATCH] few leftover changes... --- stix2/base.py | 2 +- stix2/patterns.py | 4 ++-- stix2/v20/common.py | 2 +- stix2/v21/common.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stix2/base.py b/stix2/base.py index 12ef373..375030d 100644 --- a/stix2/base.py +++ b/stix2/base.py @@ -94,7 +94,7 @@ class _STIXBase(Mapping): current_properties = self.properties_populated() list_of_properties_populated = set(list_of_properties).intersection(current_properties) - if list_of_properties and (not list_of_properties_populated or list_of_properties_populated == set(['extensions'])): + if list_of_properties and (not list_of_properties_populated or list_of_properties_populated == {'extensions'}): raise AtLeastOnePropertyError(self.__class__, list_of_properties) def _check_properties_dependency(self, list_of_properties, list_of_dependent_properties): diff --git a/stix2/patterns.py b/stix2/patterns.py index f9f451e..a718bf7 100644 --- a/stix2/patterns.py +++ b/stix2/patterns.py @@ -56,7 +56,7 @@ class TimestampConstant(_Constant): class IntegerConstant(_Constant): - """Pattern interger constant + """Pattern integer constant Args: value (int): integer value @@ -265,7 +265,7 @@ class BasicObjectPathComponent(_ObjectPathComponent): """Basic object path component (for an observation or expression) By "Basic", implies that the object path component is not a - list, object reference or futher referenced property, i.e. terminal + list, object reference or further referenced property, i.e. terminal component Args: diff --git a/stix2/v20/common.py b/stix2/v20/common.py index 6695c9a..d68b4a7 100644 --- a/stix2/v20/common.py +++ b/stix2/v20/common.py @@ -130,7 +130,7 @@ class MarkingDefinition(_STIXBase20, _MarkingsMixin): ]) def __init__(self, **kwargs): - if set(('definition_type', 'definition')).issubset(kwargs.keys()): + if {'definition_type', 'definition'}.issubset(kwargs.keys()): # Create correct marking type object try: marking_type = OBJ_MAP_MARKING[kwargs['definition_type']] diff --git a/stix2/v21/common.py b/stix2/v21/common.py index bf3aa0f..df95911 100644 --- a/stix2/v21/common.py +++ b/stix2/v21/common.py @@ -207,7 +207,7 @@ class MarkingDefinition(_STIXBase21, _MarkingsMixin): ]) def __init__(self, **kwargs): - if set(('definition_type', 'definition')).issubset(kwargs.keys()): + if {'definition_type', 'definition'}.issubset(kwargs.keys()): # Create correct marking type object try: marking_type = OBJ_MAP_MARKING[kwargs['definition_type']]