You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ANSI escape sequences (color and format control characters) used in the __repr__ method may appear garbled in unsupported environments in debugging or terminal output, affecting the readability of debugger output or logging.
Problem
The console of a debugger such as PyCharm or VSCode does not parse ANSI escape sequences correctly.
Attribute values are displayed inconsistently across multiple lines, with some members being displayed as “gibberish”.
Some property values may throw exceptions when accessed, resulting in no display.
Changes
Determine whether the current environment is a debug environment, so as to solve the problem of ANSI garbled code in the debug environment.
ANSI escape sequences (color and format control characters) used in the
__repr__
method may appear garbled in unsupported environments in debugging or terminal output, affecting the readability of debugger output or logging.Problem
Changes
Determine whether the current environment is a debug environment, so as to solve the problem of ANSI garbled code in the debug environment.
Example of modified output:
Originally posted by @JonnyDing in #186 (comment)
The text was updated successfully, but these errors were encountered: