-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
mawildoer
commented
Aug 22, 2024
75a94dd
to
317376f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice addition thanks!
return {"data": {"source": source, "target": target, "type": type_name}} | ||
|
||
all_gifs = list( | ||
gif for node in get_all_nodes_graph(G) for gif in node.GIFs.get_all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can get the gifs with node.GIFs.self.edges instead of get_all to make it graph space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but all_gifs = list(G)
so thats even easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice! Thanks mate! Much cleaner!
return x is not None | ||
|
||
elements = [ | ||
*(filter(_not_none, (_node(gif) for gif in all_gifs))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for gif in G