diff --git a/sdk/python/kfp/components/_python_op.py b/sdk/python/kfp/components/_python_op.py index b50b79681bf..58f3bba8b4a 100644 --- a/sdk/python/kfp/components/_python_op.py +++ b/sdk/python/kfp/components/_python_op.py @@ -259,7 +259,7 @@ def _capture_function_code_using_source_copy(func) -> str: return func_code -def _extract_component_interface(func:Callable) -> ComponentSpec: +def _extract_component_interface(func: Callable) -> ComponentSpec: single_output_name_const = 'Output' signature = inspect.signature(func) @@ -268,7 +268,6 @@ def _extract_component_interface(func:Callable) -> ComponentSpec: parsed_docstring = docstring_parser.parse(inspect.getdoc(func)) doc_dict = {p.arg_name: p.description for p in parsed_docstring.params} - inputs = [] outputs = [] diff --git a/sdk/python/kfp/components_tests/test_python_op.py b/sdk/python/kfp/components_tests/test_python_op.py index 48f4097cb85..0c5f0b61a63 100644 --- a/sdk/python/kfp/components_tests/test_python_op.py +++ b/sdk/python/kfp/components_tests/test_python_op.py @@ -470,7 +470,7 @@ def pipeline( """ component_spec = comp._python_op._func_to_component_spec(pipeline) - self.assertEqual(component_spec.description,'Pipeline to Demonstrate Usage of Secret') + self.assertEqual(component_spec.description, 'Pipeline to Demonstrate Usage of Secret') self.assertEqual(component_spec.inputs[0].description, 'Name of the variable inside the Pod') self.assertEqual(component_spec.inputs[1].description, 'Name of the Secret in the namespace') self.assertIsNone(component_spec.inputs[2].description)