-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: better warning traceback for deprecated weight_cp method
- Loading branch information
1 parent
304a724
commit 9056022
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import warnings | ||
|
||
from .residuals import compute_contact_point_weights as weight_cp # noqa: F401 | ||
from .residuals import compute_contact_point_weights # noqa: F401 | ||
|
||
warnings.warn( | ||
"The 'weight' module is deprecated. Please use " | ||
"'from nanite.model.residuals import compute_contact_point_weights'!", | ||
DeprecationWarning) | ||
|
||
def weight_cp(*args, **kwargs): | ||
warnings.warn( | ||
"The 'weight' module is deprecated. Please use " | ||
"'from nanite.model.residuals import compute_contact_point_weights'!", | ||
DeprecationWarning) | ||
return compute_contact_point_weights(*args, **kwargs) |