Prefect: Docs Issue: Flow.edges_from() and edges_to()

Created on 26 Jul 2020  路  5Comments  路  Source: PrefectHQ/prefect

They are documented as:

Returns:
dict with the key as the task passed in and the value as a set of all edges leading from that task

However their actual signature is not a dictionary, but rather:

    def edges_from(self, task: Task) -> Set[Edge]:

(which makes sense, as why pass task and then also index by task to get the edges you requested.)

docs good first issue

All 5 comments

Thanks for pointing this out @shaunc!

First time open-source contributor here. I would like to fix this issue, and just want to clarify that instead of saying:

Returns:
dict with the key as the task passed in and the value as a set of all edges leading from that task

it should say:

Returns:
Set of all edges leading from that task

is this correct?

Hi @andykawabata and welcome! Yes that would work; to better fit with our other doc Return signatures (which are of the form - type: description you might also do:

- Set: set of all edges leading from that task

but it's not super important either way. Also note that this needs updating on both flow.edges_from and flow.edges_to :+1:

Thanks @andykawabata ! You're encouraging me by example. :)

Closed by #3128

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rej-jsa picture rej-jsa  路  4Comments

ponggung picture ponggung  路  3Comments

jameslamb picture jameslamb  路  3Comments

kforti picture kforti  路  3Comments

gryBox picture gryBox  路  3Comments