From d0a824c80f5d7c9aeb51adf2e0c60890a482246d Mon Sep 17 00:00:00 2001 From: PatchOfScotland Date: Thu, 9 Feb 2023 09:28:42 +0100 Subject: [PATCH] cleaned up a few loose imports no longer needed and commented out code --- core/correctness/validation.py | 5 ----- recipes/python_recipe.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/core/correctness/validation.py b/core/correctness/validation.py index 4e9c752..463ca1d 100644 --- a/core/correctness/validation.py +++ b/core/correctness/validation.py @@ -53,11 +53,6 @@ def check_type(variable:Any, expected_type:Type, alt_types:List[Type]=[], if get_origin(expected_type) is Union: type_list = list(get_args(expected_type)) type_list = type_list + alt_types -# # If we have any types from typing, then update to allow checks against -# # their base types too -# for t in type_list: -# if get_origin(t): -# type_list.append(get_origin(t)) # Only accept None if explicitly allowed if variable is None: diff --git a/recipes/python_recipe.py b/recipes/python_recipe.py index dc95a0b..c20fbb5 100644 --- a/recipes/python_recipe.py +++ b/recipes/python_recipe.py @@ -17,7 +17,7 @@ from core.correctness.vars import VALID_VARIABLE_NAME_CHARS, PYTHON_FUNC, \ EVENT_RULE, EVENT_PATH, JOB_TYPE_PYTHON, WATCHDOG_HASH, JOB_PARAMETERS, \ PYTHON_OUTPUT_DIR, JOB_ID, WATCHDOG_BASE, META_FILE, \ PARAMS_FILE, JOB_STATUS, STATUS_QUEUED, EVENT_TYPE, EVENT_RULE, \ - get_job_file, get_base_file, get_result_file + get_base_file from core.functionality import print_debug, create_job, replace_keywords, \ make_dir, write_yaml, write_file, lines_to_string, read_file_lines from core.meow import BaseRecipe, BaseHandler