8000 suggested color changes for cherry-picker output by smontanaro · Pull Request #120 · python/cherry-picker · GitHub
[go: up one dir, main page]

Skip to content

suggested color changes for cherry-picker output #120

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
click *does* have a color list!
  • Loading branch information
smontanaro committed Feb 24, 2024
commit b33029e1cbce073bb61cc1b45e7cad52212d8f1f
5 changes: 4 additions & 1 deletion cherry_picker/cherry_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import webbrowser

import click
from click.termui import _ansi_colors as color_names
import requests
from gidgethub import sansio

Expand Down Expand Up @@ -1170,7 +1171,9 @@ def normalize_color(color):
return (red, green, blue)

# fallback is to assume it's a color name supported by click.
return color
if color in color_names:
return color
raise ValueError(f"unrecognized color: '{color}'")


if __name__ == "__main__":
Expand Down
0