GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-148352: Add more colour to `calendar` CLI output by hugovk · Pull Request #148354 · python/cpython Conversation
| |||||||||||||||||||||||||||||||||||||||||||
| Before | After |
|---|---|
|
|
📚 Documentation preview 📚: https://cpython-previews--148354.org.readthedocs.build/
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Rihaan Meher <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Rihaan Meher <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @hugovk :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1122,4 +1123,4 @@ | |||
| self.assertCmdFails(*args) | |||
|
|
|||
| @support.force_not_colorized | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can be removed, no?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Removed!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.assertCmdFails(*args) | ||
|
|
||
| @support.force_not_colorized | ||
| def test_help(self): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can we also have a case checking for color?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Added!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Documentation build overview
52 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| today = datetime.date(2026, 5, 4) | ||
| cal = calendar._CLIDemoCalendar(highlight_day=today) | ||
| output = cal.formatmonth(2026, 5) | ||
| self.assertIn("\x1b[30m\x1b[43mMay 2026\x1b[0m\n\x1b[36m", output) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do we support running tests with different themes? If a user has a custom theme this test will fail.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We don't support running tests with different themes.
Other tests could also break if the user changed the theme:
❯ rg "x1b" Lib/test/test_*.py -l | wc -l 13
Right now the theme API is internal/private. If we make it public in a later release, we'll need to consider tests are with the default theme or a specific theme.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM :-) 🌈
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @sharktide and @StanFromIreland for the reviews! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.