golemfactory / golem-core-python

GNU General Public License v3.0
3 stars 2 forks source link

`Resource._get_children(child_type)` #30

Open johny-b opened 1 year ago

johny-b commented 1 year ago

This is a not really important internal micro-improvement.

We have in various places things like:

def debit_notes(self) -> List[DebitNote]:
    return [child for child in self.children if isinstance(child, DebitNote)]

--> we could have Resource._get_children method that returns children of a given type.