Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

### Problem description #188

Closed
JonnyDing opened this issue Dec 21, 2024 · 0 comments
Closed

### Problem description #188

JonnyDing opened this issue Dec 21, 2024 · 0 comments

Comments

@JonnyDing
Copy link
Contributor

          ### Problem description

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.
    before

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:
after

Originally posted by @JonnyDing in #186 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant