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

perf: optimize the way to obtain the styles #1

Merged

Conversation

fzbian
Copy link

@fzbian fzbian commented Apr 29, 2023

  • getStyle() function was made more efficient by using a dictionary to look up the ANSI codes.
  • uncolor()
    • function was made more efficient by using a single loop to iterate over the styles and the text.
    • function was made more informative by printing a warning if any styles are not found.

- getStyle() function was made more efficient by using a dictionary to look up the ANSI codes.
- uncolor()
  - function was made more efficient by using a single loop to iterate over the styles and the text.
  - function was made more informative by printing a warning if any styles are not found.
@gatomod
Copy link
Owner

gatomod commented Apr 29, 2023

Thanks for the PR, I don't know too much about Python. Merged

@gatomod gatomod merged commit 6a0d17c into gatomod:master Apr 29, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants