Skip to content

Commit 8563795

Browse files
committed
Renamed argument from color to name for fg.get_value() and bg.get_value()
1 parent 862d511 commit 8563795

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd2/ansi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def colors() -> List[str]:
6060
return [color.name for color in fg]
6161

6262
@staticmethod
63-
def get_value(color: str) -> str:
63+
def get_value(name: str) -> str:
6464
"""Retrieve color code by name string."""
65-
return fg.__members__[color].value
65+
return fg.__members__[name].value
6666

6767

6868
# Background colors
@@ -98,9 +98,9 @@ def colors() -> List[str]:
9898
return [color.name for color in bg]
9999

100100
@staticmethod
101-
def get_value(color: str) -> str:
101+
def get_value(name: str) -> str:
102102
"""Retrieve color code by name string."""
103-
return bg.__members__[color].value
103+
return bg.__members__[name].value
104104

105105

106106
FG_RESET = fg.reset.value

0 commit comments

Comments
 (0)