1414
1515from fairworkflows import namespaces , LinguisticSystem , LINGSYS_ENGLISH , LINGSYS_PYTHON
1616from fairworkflows .config import DUMMY_FAIRWORKFLOWS_URI , IS_FAIRSTEP_RETURN_VALUE_PARAMETER_NAME , \
17- LOGGER
17+ LOGGER , WARN_FOR_TYPE_HINTING
1818from fairworkflows .prov import prov_logger , StepRetroProv
1919from fairworkflows .rdf_wrapper import RdfWrapper , replace_in_rdf
2020from fairworkflows import manual_assistant
@@ -504,9 +504,10 @@ def _extract_inputs_from_function(func, additional_params) -> List[FairVariable]
504504 try :
505505 computational_type = argspec .annotations [arg ].__name__
506506 except KeyError :
507- warn (f'Function input argument { arg } does not have type hinting, '
508- 'FAIR step function arguments without type hinting will not have a computational '
509- 'type associated with them see https://docs.python.org/3/library/typing.html' )
507+ if WARN_FOR_TYPE_HINTING :
508+ warn (f'Function input argument { arg } does not have type hinting, '
509+ 'FAIR step function arguments without type hinting will not have a computational '
510+ 'type associated with them see https://docs.python.org/3/library/typing.html' )
510511 computational_type = None
511512 inputs .append (FairVariable (
512513 name = arg ,
@@ -524,10 +525,11 @@ def _extract_outputs_from_function(func, additional_params) -> List[FairVariable
524525 try :
525526 return_annotation = annotations ['return' ]
526527 except KeyError :
527- warn (f'Function output does not have type hinting, '
528- 'The outputs will not have a computational '
529- 'type associated with them. Also multiple outputs will not be captured'
530- 'correctly. See https://docs.python.org/3/library/typing.html' )
528+ if WARN_FOR_TYPE_HINTING :
529+ warn (f'Function output does not have type hinting, '
530+ 'The outputs will not have a computational '
531+ 'type associated with them. Also multiple outputs will not be captured'
532+ 'correctly. See https://docs.python.org/3/library/typing.html' )
531533 return_annotation = None
532534
533535 if _is_generic_tuple (return_annotation ):
0 commit comments