mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2026-01-20 15:12:59 -05:00
Various improvements in usage of Rich in Red (#4726)
* Use Rich's default console object instead of making one * Bump Rich to version 9.8.2 * Disable indent guides in tracebacks * Skip empty lines between stack levels in traceback rendering * Use full width of the terminal when printing tracebacks * Disabling syntax highlighting on the log messages * Make logger name bold * Make logger level bold * Make URLs in console bold * Change `bright_blue` and `blue` colors in syntax theme (NEEDS CHANGING) * Show only one line per stack level in tracebacks * Shuffle things in `redbot.logging` a bit * Change logging handler while redirecting stdout in Dev cog * Revert last two commits... This reverts commit cf563bd06a6ae398da12713ceef3db9cc903d902. This reverts commit 6dddf300726ddf89b8924441eed59b67b58faca0. * Change Rich console to always print to sys.stdout (therefore ignoring stdout redirects) * Pass cli_flags to init_logging() * Add a flag to set the amount of extra lines in rich tracebacks * First take on the syntax theme colors * Use the Windows trick * ARE YOU SERIOUS!? * Remove dead code * Use Monokai when Terminal application supports truecolor * Syntax theme update * Change logger name color * This is not needed * Adjust logging level colors * Add a flag for showing local variables in Rich tracebacks * change imports a bit * Remove usage of blue color fully * Stop highlighting in Red-DiscordBot splash * Fix unreadable paths in tracebacks * Make CRITICAL logging level more readable * Make time in logs more readable * Fix the first row being bolded in tables * Update rich to 9.9.0
This commit is contained in:
@@ -29,7 +29,6 @@ from typing import (
|
||||
overload,
|
||||
)
|
||||
from types import MappingProxyType
|
||||
from rich.console import Console
|
||||
|
||||
import discord
|
||||
from discord.ext import commands as dpy_commands
|
||||
@@ -224,9 +223,6 @@ class RedBase(
|
||||
|
||||
self._deletion_requests: MutableMapping[int, asyncio.Lock] = weakref.WeakValueDictionary()
|
||||
|
||||
# Although I see the use of keeping this public, lets rather make it private.
|
||||
self._rich_console = Console()
|
||||
|
||||
def set_help_formatter(self, formatter: commands.help.HelpFormatterABC):
|
||||
"""
|
||||
Set's Red's help formatter.
|
||||
|
||||
Reference in New Issue
Block a user