File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,22 +50,19 @@ def _do_pp(self, arg):
5050 self ._original_do_pp (arg )
5151
5252
53- def _do_inspect (self , arg ):
54- """Override the inspect command to use rich."""
55- try :
56- # Evaluate the argument in the current debugging context
57- obj = self ._getval (arg )
58- # Use rich's inspect to display the object
59- rich .inspect (obj )
60- except Exception :
61- self ._original_do_inspect (arg )
53+ def _do_ii (self : Pdb , arg ):
54+ """Provide a rich inspect command."""
55+ # Evaluate the argument in the current debugging context
56+ obj = self ._getval (arg )
57+ # Use rich's inspect to display the object
58+ rich .inspect (obj )
6259
6360
6461Pdb ._original_do_pp = Pdb .do_pp
6562Pdb .do_pp = _do_pp
6663
67- Pdb ._original_do_inspect = Pdb . do_inspect
68- Pdb . do_inspect = _do_pp
64+ Pdb .do_ii = _do_ii
65+
6966DefaultConfig .sticky_by_default = True
7067
7168
You can’t perform that action at this time.
0 commit comments