Skip to content

Commit 217b712

Browse files
committed
Remove unused class ParameterFactory.
1 parent 0d6f99c commit 217b712

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

diffpy/srfit/interface/__init__.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@
1717
1818
The classes and functions in this package are designed to unobtrusively mix
1919
with base SrFit objects and provide them with interface enhancements for
20-
scripting. To use the interface, import this module and call the 'use' method
21-
before importing any other part of SrFit.
22-
20+
scripting.
2321
"""
2422

25-
__all__ = ["ParameterFactory"]
2623

2724
from diffpy.srfit.interface.interface import ParameterInterface
2825
_parameter_interface = ParameterInterface
@@ -36,6 +33,5 @@
3633
from diffpy.srfit.interface.interface import FitRecipeInterface
3734
_fitrecipe_interface = FitRecipeInterface
3835

39-
from diffpy.srfit.interface.interface import ParameterFactory
4036

4137
# End of file

diffpy/srfit/interface/interface.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
objects. See individual interface classes for specifics.
2121
"""
2222

23-
__all__ = ["ParameterFactory", "ParameterInterface", "FitRecipeInterface",
23+
__all__ = ["ParameterInterface", "FitRecipeInterface",
2424
"RecipeOrganizerInterface"]
2525

2626
from diffpy.srfit.equation.literals.abcs import isinstance, ArgumentABC
@@ -148,25 +148,6 @@ def f(*args):
148148

149149
# End class FitRecipeInterface
150150

151-
class ParameterFactory(object):
152-
"""This class is used to create Parameters on demand."""
153-
154-
def __init__(self, parclass):
155-
"""Initialize the factory.
156-
157-
parclass -- The class used to create new parameters (default
158-
diffpy.srfit.fitbase.parameter.Parameter)
159-
"""
160-
self._pclass = parclass
161-
162-
def __getattr__(self, name):
163-
pcls = object.__getattribute__(self, '_pclass')
164-
par = pcls(name=name)
165-
setattr(self, name, par)
166-
return par
167-
168-
# End class ParameterFactory
169-
170151
def _applymanyargs(args, f):
171152
"""Apply arguments to a function.
172153

0 commit comments

Comments
 (0)