Skip to content

Commit

Permalink
click *does* have a color list!
Browse files Browse the repository at this point in the history
  • Loading branch information
smontanaro committed Feb 24, 2024
1 parent a9ca1ea commit b33029e
Showing 1 changed file with 4 additions and 1 deletion.
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)

Check warning on line 1171 in cherry_picker/cherry_picker.py

View check run for this annotation

Codecov / codecov/patch

cherry_picker/cherry_picker.py#L1167-L1171

Added lines #L1167 - L1171 were not covered by tests

# 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}'")

Check warning on line 1176 in cherry_picker/cherry_picker.py

View check run for this annotation

Codecov / codecov/patch

cherry_picker/cherry_picker.py#L1176

Added line #L1176 was not covered by tests


if __name__ == "__main__":
Expand Down

0 comments on commit b33029e

Please sign in to comment.