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

Replace manual color codes with sopel.formatting #1516

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

half-duplex
Copy link
Member

@half-duplex half-duplex commented Mar 24, 2019

Cleaner, and makes source display work correctly in editors that don't like non-printing characters.

@dgw dgw added this to the 6.6.6 milestone Mar 24, 2019
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I present to you, @dgw's traditional nitpick review.

If you're not put off by the idea of getting really anal about whether whitespace is included in formatted spans or not, there are some spots in the reddit module that you could fix up, too. 😉

sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
sopel/modules/meetbot.py Outdated Show resolved Hide resolved
if u.is_mod:
message = message + ' | 05Mod'
message = message + ' | ' + bold(color('Mod', colors.GREEN))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically changing the color, not just replacing it with formatting functions.

That said… green is the color Reddit uses for displaying moderators' names, so… Consider this a start on the devilish festivities for v6.6.6, since we're changing behavior (however slightly) in a patch release. 😛

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct on all counts.
It does change behavior, but if this breaks something... whoever built something that parses sopel's output was doing very silly things anyway, and the changes to spacing and colon bolding would also likely break it.

@dgw dgw added the Tweak label Mar 25, 2019
@dgw dgw merged commit 62601ff into sopel-irc:6.6.x Apr 10, 2019
@half-duplex half-duplex deleted the use-library-colors branch April 10, 2019 19:36
@half-duplex half-duplex restored the use-library-colors branch May 14, 2023 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants