From 42e6039463d67966d931b4562c045594c4df0483 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Mon, 1 Aug 2022 16:49:23 +0300 Subject: [PATCH] Common: Shorten the validator import statements --- .../agent_sub_configuration_schemas.py | 8 ++++++-- monkey/common/agent_configuration/validators/__init__.py | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py index bf5f31c61..401c04d90 100644 --- a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py +++ b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py @@ -12,8 +12,12 @@ from .agent_sub_configurations import ( TCPScanConfiguration, ) from .utils import freeze_lists -from .validators.filenames import validate_linux_filename, validate_windows_filename -from .validators.ip_ranges import validate_ip, validate_subnet_range +from .validators import ( + validate_ip, + validate_linux_filename, + validate_subnet_range, + validate_windows_filename, +) class CustomPBAConfigurationSchema(Schema): diff --git a/monkey/common/agent_configuration/validators/__init__.py b/monkey/common/agent_configuration/validators/__init__.py index e69de29bb..f2c6dfad5 100644 --- a/monkey/common/agent_configuration/validators/__init__.py +++ b/monkey/common/agent_configuration/validators/__init__.py @@ -0,0 +1,8 @@ +from .filenames import validate_linux_filename, validate_windows_filename +from .ip_ranges import ( + validate_ip, + validate_hostname, + validate_ip_range, + validate_subnet_range, + validate_ip_network, +)