diff --git a/stix2/STIXPatternVisitor.py b/stix2/STIXPatternVisitor.py index 5fbfc06..a8e86ea 100644 --- a/stix2/STIXPatternVisitor.py +++ b/stix2/STIXPatternVisitor.py @@ -1,5 +1,5 @@ import six -from stix2patterns.grammars.STIXPatternParser import * +from stix2patterns.grammars.STIXPatternParser import TerminalNode from stix2patterns.grammars.STIXPatternVisitor import STIXPatternVisitor from antlr4 import CommonTokenStream, InputStream from stix2patterns.grammars.STIXPatternLexer import STIXPatternLexer @@ -15,14 +15,14 @@ from .patterns import (FollowedByObservationExpression, WithinQualifier, RepeatQualifier, BasicObjectPathComponent, + ListObjectPathComponent, StringConstant, IntegerConstant, FloatConstant, HexConstant, BinaryConstant, BooleanConstant, - TimestampConstant -) + TimestampConstant) def collapse_lists(lists): diff --git a/stix2/test/test_pattern_expressions.py b/stix2/test/test_pattern_expressions.py index 07c9e1d..ae9a739 100644 --- a/stix2/test/test_pattern_expressions.py +++ b/stix2/test/test_pattern_expressions.py @@ -4,6 +4,7 @@ import pytest import stix2 + def test_create_comparison_expression(): exp = stix2.EqualityComparisonExpression("file:hashes.'SHA-256'", stix2.HashConstant("aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f", "SHA-256")) # noqa