Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address code review feedback - remove variable shadowing and extra bl…
…ank line

Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
  • Loading branch information
Copilot and Carreau committed Feb 11, 2026
commit acbcb347c0b066f975c042b4fa3fc80e270bcc68
4 changes: 1 addition & 3 deletions IPython/lib/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,6 @@ def _exception_pprint(obj, p, cycle):
if _env_type is not dict:
_type_pprinters[_env_type] = _dict_pprinter_factory('environ{', '}')


_type_pprinters[types.MappingProxyType] = _dict_pprinter_factory("mappingproxy({", "})")
_type_pprinters[slice] = _repr_pprint

Expand All @@ -871,8 +870,7 @@ def _exception_pprint(obj, p, cycle):

# Also register os._Environ as deferred printer to handle module reloading scenarios
# (e.g., in test environments). This uses module+name lookup rather than type identity.
_env_type = type(os.environ)
if _env_type is not dict:
if type(os.environ) is not dict:
_deferred_type_pprinters[('os', '_Environ')] = _dict_pprinter_factory('environ{', '}')


Expand Down