Skip to content

Commit 9993779

Browse files
committed
change name to register_restraint
1 parent 3b9b257 commit 9993779

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/diffpy/srfit/fitbase/recipeorganizer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
addRestraint_deprecation_msg = build_deprecation_message(
122122
recipeorganizer_base,
123123
"addRestraint",
124-
"add_restraint",
124+
"register_restraint",
125125
removal_version,
126126
)
127127

@@ -1181,10 +1181,10 @@ def restrain(
11811181
# Make and store the restraint
11821182
param_or_eq = Restraint(eq, lb, ub, sig, scaled)
11831183
param_or_eq.eqstr = eqstr
1184-
self.add_restraint(param_or_eq)
1184+
self.register_restraint(param_or_eq)
11851185
return param_or_eq
11861186

1187-
def add_restraint(self, res):
1187+
def register_restraint(self, res):
11881188
"""Add a Restraint instance to the RecipeOrganizer.
11891189
11901190
Parameters
@@ -1203,10 +1203,10 @@ def addRestraint(self, res):
12031203
version 4.0.0.
12041204
12051205
Please use
1206-
diffpy.srfit.fitbase.recipeorganizer.RecipeOrganizer.add_restraint
1206+
diffpy.srfit.fitbase.recipeorganizer.RecipeOrganizer.register_restraint
12071207
instead.
12081208
"""
1209-
self.add_restraint(res)
1209+
self.register_restraint(res)
12101210
return
12111211

12121212
def unrestrain(self, *ress):
@@ -1216,7 +1216,7 @@ def unrestrain(self, *ress):
12161216
----------
12171217
*ress
12181218
Restraints returned from the 'restrain' method or added
1219-
with the 'add_restraint' method.
1219+
with the 'register_restraint' method.
12201220
"""
12211221
update = False
12221222
restuple = tuple(self._restraints)

0 commit comments

Comments
 (0)