Skip to content

Commit

Permalink
Remove __init__ from RNE
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyKozhevin committed Nov 5, 2019
1 parent eb76bef commit f12770b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions batchflow/research/named_expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

class ResearchNamedExpression(NamedExpression):
""" NamedExpression base class for Research objects """
def __init__(self, name=None):
super().__init__(name=name)

def _get(self, **kwargs):
name = self._get_name(**kwargs)
return name, kwargs
Expand Down Expand Up @@ -60,9 +57,10 @@ def get(self, **kwargs):

class ResearchConfig(ResearchExecutableUnit):
""" NamedExpression for Config of the ExecutableUnit """
def __init__(self, name):
super().__init__(name=name)

def get(self, **kwargs):
if self.name is None:
raise ValueError('`name` must be defined for RC expressions')
res = super().get(**kwargs)

if isinstance(res, list):
Expand Down

0 comments on commit f12770b

Please sign in to comment.