Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-forte-elastic committed Oct 27, 2023
1 parent 13d899f commit af3c9f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Test Python Engine for EQL."""
import random
import re
import unittest

from eql.ast import String, Field
Expand Down
3 changes: 1 addition & 2 deletions tests/test_python_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ def test_custom_functions(self):

def test_cidrmatch(self):
"""Test the cidrMatch custom function."""

def to_range(cidr):
"""Convert a CIDR notation to a tuple of the minimum and maximum IP addresses in the range."""
ip_network = ipaddress.ip_network(cidr, strict=False)
Expand All @@ -407,7 +406,7 @@ def generate_random_ip_from_range(min_ip_address, max_ip_address):
"""Generate a random IP address from a given range."""
ip_constructor = type(min_ip_address)

# Convert the ipaddress.IPv4Address or ipaddress.IPv6 to integers before passing them to the random.randint() function.
# Convert the ipaddress.IPv4Address or ipaddress.IPv6 to integers
min_ip_address_int = int(min_ip_address)
max_ip_address_int = int(max_ip_address)

Expand Down

0 comments on commit af3c9f4

Please sign in to comment.