diff --git a/queenbee/io/inputs/alias.py b/queenbee/io/inputs/alias.py index aaf77133..ca76dd75 100644 --- a/queenbee/io/inputs/alias.py +++ b/queenbee/io/inputs/alias.py @@ -7,7 +7,6 @@ """ import os -import warnings from typing import Dict, Union, List from pydantic import constr, Field, validator @@ -302,14 +301,8 @@ class DAGFolderInputAlias(DAGGenericInputAlias): ) @validator('required', always=True) - def check_required(cls, v, values): + def check_required(cls, v): """Overwrite check_required fro artifacts to allow optional artifacts.""" - default = values.get('default', None) - name = values.get('name', None) - if default is None and v is False: - warnings.warn( - f'{cls.__name__}.{name} -> set to optional input artifact.' - ) return v def validate_spec(self, value): diff --git a/queenbee/io/inputs/dag.py b/queenbee/io/inputs/dag.py index a9f72369..ae658c08 100644 --- a/queenbee/io/inputs/dag.py +++ b/queenbee/io/inputs/dag.py @@ -1,7 +1,6 @@ """Queenbee input types for a DAG.""" import os -import warnings from typing import Dict, Union, List from pydantic import constr, Field, validator @@ -268,17 +267,8 @@ class DAGFolderInput(DAGGenericInput): ) @validator('required', always=True) - def check_required(cls, v, values): + def check_required(cls, v): """Overwrite check_required fro artifacts to allow optional artifacts.""" - if 'default' not in values: - return v - default = values.get('default') - name = values.get('name', None) - if default is None and v is False: - warnings.warn( - f'{cls.__name__}.{name} has no default value and is not required. ' - 'Set to optional input artifact.' - ) return v def validate_spec(self, value):