mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-07 13:24:16 +00:00
Add instance argument to code samples in docstrings for component.py (#7622)
This commit is contained in:
parent
8cb3cecf34
commit
5de5619abd
@ -292,7 +292,7 @@ class _Component:
|
|||||||
class MyComponent:
|
class MyComponent:
|
||||||
|
|
||||||
def __init__(self, value: int):
|
def __init__(self, value: int):
|
||||||
component.set_input_types(value_1=str, value_2=str)
|
component.set_input_types(self, value_1=str, value_2=str)
|
||||||
...
|
...
|
||||||
|
|
||||||
@component.output_types(output_1=int, output_2=str)
|
@component.output_types(output_1=int, output_2=str)
|
||||||
@ -309,7 +309,7 @@ class _Component:
|
|||||||
class MyComponent:
|
class MyComponent:
|
||||||
|
|
||||||
def __init__(self, value: int):
|
def __init__(self, value: int):
|
||||||
component.set_input_types(value_1=str, value_2=str)
|
component.set_input_types(self, value_1=str, value_2=str)
|
||||||
...
|
...
|
||||||
|
|
||||||
@component.output_types(output_1=int, output_2=str)
|
@component.output_types(output_1=int, output_2=str)
|
||||||
@ -337,7 +337,7 @@ class _Component:
|
|||||||
class MyComponent:
|
class MyComponent:
|
||||||
|
|
||||||
def __init__(self, value: int):
|
def __init__(self, value: int):
|
||||||
component.set_output_types(output_1=int, output_2=str)
|
component.set_output_types(self, output_1=int, output_2=str)
|
||||||
...
|
...
|
||||||
|
|
||||||
# no decorators here
|
# no decorators here
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user