Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rw-access committed Apr 14, 2020
1 parent c26ab63 commit 7d65796
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion eql/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ def _update_field_info(self, node_info):
event_index, event_field = field.query_multiple_events()
num_events = len(self._pipe_schemas)
if event_index >= num_events:
raise self._error(node_info.sub_fields[0], "Invalid index. Event array is size {num}", num=num_events)
raise self._error(node_info.sub_fields[0], "Invalid index. Event array is size {num}",
num=num_events)

event_schema = self._pipe_schemas[event_index]

Expand Down
2 changes: 1 addition & 1 deletion eql/pipes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""EQL Pipes."""
from .ast import PipeCommand
from .schema import Schema, EVENT_TYPE_GENERIC
from .types import TypeHint, NodeInfo
from .types import TypeHint, NodeInfo # noqa: F401

__all__ = (
"list_pipes",
Expand Down
1 change: 0 additions & 1 deletion eql/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from .schema import Schema, EVENT_TYPE_ANY, EVENT_TYPE_GENERIC
from .table import Table
from .utils import stream_file_events, load_dump, to_unicode, is_array
from .types import TypeHint

try:
import prompt_toolkit
Expand Down
2 changes: 1 addition & 1 deletion eql/signatures.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Mixin for adding signature validation."""
from .types import NodeInfo
from .types import NodeInfo # noqa: F401


class SignatureMixin(object):
Expand Down
2 changes: 1 addition & 1 deletion eql/walkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _exit_pipe_command(self, node):
self.in_pipes = False

incoming_schema = [Schema({event_type: {}}) for event_type in self.output_event_types]
output_schemas = node.output_schemas([NodeInfo(arg, TypeHint.Unknown) for arg in node.arguments], incoming_schema)
output_schemas = node.output_schemas([NodeInfo(a, TypeHint.Unknown) for a in node.arguments], incoming_schema)
self.output_event_types = [next(iter(s.schema.keys())) for s in output_schemas]

def _walk_default(self, node, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion tests/test_type_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class TestTypeSystem(unittest.TestCase):

def test_specifier_checks(self):
"""Test that specifiers are properly compared."""

dynamic = TypeFoldCheck(TypeHint.Unknown, False)
literal = TypeFoldCheck(TypeHint.Unknown, True)
either = TypeHint.Unknown
Expand Down

0 comments on commit 7d65796

Please sign in to comment.