-
Notifications
You must be signed in to change notification settings - Fork 12
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
Include legacy detection #159
Include legacy detection #159
Conversation
I think the changes in |
@MatthiasZepper Other than the requested change it looks good! |
@MatthiasZepper Run |
@inaod568 Beyond comprehension: Configured everything together with Johannes last week, so that black runs automatically with every time a file is saved in VS Code. This also worked on last Thursday and Friday. Apparently MacOS update also broke that and I didn't notice, because the other stuff in VSCode like the extensions still worked like a charm. |
Ah yeah, could also be a VSCode thing. It does weird things some times. But great that it's working again / that black has been run again 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rich
handles the display witdh etc automatically, so the extra 3 characters here really shouldn't affect this. The only thing that will happen is that the actual progress bar will become shorter. So the "todo test for display width" thing is not something we need to put a lot of effort into, this should be a sufficient solution 👍🏻
Addresses issue #93.
Suggested changes:
dds_on_legacy_console
in the__init__.py
that stores the return value ofrich.console.detect_legacy_windows()
. Otherwise the detection would need to occur every time the methodTextHandler.task_name
is called.text_handler.py
and a different dictionary is used to resolve thestep
, which contains spelled out status messages instead of emojis.Testing:
rich.console.detect_legacy_windows()
returns TRUE on a Windows 8 cmd.exe (tested before with a separate example script).Subject to further discussion:
For the record:
rich.console.detect_legacy_windows()
is unfortunately only a proxy to detect if emojis will be displayed correctly. Unicode support is mandatory and font fallback required, if the chosen font doesn't have glyphs for the respective emojis. Windows legacy consoles never support font fallback and rarely Unicode. Font fallback might be an issue on other terminal emulators and operating systems, too and is not tested for with above condition.exceptions.py
. Currently they are not stripped from the output there, so the current pull request does not fully resolve Fix Windows icon compatibility #93 .