Skip to content

Commit

Permalink
py deprecation: Remove "Please see ..." addendum (RobotLocomotion#12578)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricCousineau-TRI authored Jan 15, 2020
1 parent 5e392f9 commit 456e891
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions bindings/pydrake/common/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ def _install(cls, name, handler):
class DrakeDeprecationWarning(DeprecationWarning):
"""Extends `DeprecationWarning` to permit Drake-specific warnings to
be filtered by default, without having side effects on other libraries."""
addendum = ("\n Please see `help(pydrake.common.deprecation)` " +
"for more information.")

def __init__(self, message, *args):
extra_message = message + DrakeDeprecationWarning.addendum
DeprecationWarning.__init__(self, extra_message, *args)
pass


def _warn_deprecated(message, stacklevel=2):
Expand Down
1 change: 0 additions & 1 deletion bindings/pydrake/common/test/deprecation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def test_module_autocomplete(self):
def _check_warning(self, item, message_expected, check_full=True):
self.assertEqual(item.category, DrakeDeprecationWarning)
if check_full:
message_expected += DrakeDeprecationWarning.addendum
self.assertEqual(message_expected, str(item.message))
else:
self.assertIn(message_expected, str(item.message))
Expand Down

0 comments on commit 456e891

Please sign in to comment.