Skip to content

Commit

Permalink
Remove ParameteredDeclaration
Browse files Browse the repository at this point in the history
It was part of the private API; its features have been merged into the
BaseDeclaration class, hence that class is no longer required.
  • Loading branch information
rbarrois committed Dec 23, 2020
1 parent 824c6e0 commit 82d6144
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions factory/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,29 +320,6 @@ def generate(self, step, params):
raise NotImplementedError()


class ParameteredDeclaration(BaseDeclaration):
"""A declaration with parameters.
The parameters can be any factory-enabled declaration, and will be resolved
before the call to the user-defined code in `self.generate()`.
Attributes:
defaults (dict): Default values for the parameters; can be overridden
by call-time parameters. Accepts BaseDeclaration subclasses.
"""

def evaluate(self, instance, step, extra):
return self.generate(extra)

def generate(self, params):
"""Generate a value for this declaration.
Args:
params (dict): the parameters, after a factory evaluation.
"""
raise NotImplementedError()


class _FactoryWrapper:
"""Handle a 'factory' arg.
Expand Down

0 comments on commit 82d6144

Please sign in to comment.