Skip to content

Commit bbbc369

Browse files
committed
first attempt
1 parent a35038f commit bbbc369

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

src/afcharts/af_colours.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
# Py-af-colours source: https://github.com/best-practice-and-impact/py-af-colours
55

66
from pathlib import Path
7-
from typing import List, Optional, Tuple, Union
7+
from typing import List, Optional, Tuple
88

99
import yaml
1010

11-
1211
def get_af_colours(
1312
palette: str, colour_format: str = "hex", number_of_colours: int = 6, config_path: Optional[Path] = None
14-
) -> List[Union[str, Tuple[int, int, int]]]:
13+
):
1514
"""
1615
get_af_colours() is the top level function in af_colours. This returns
1716
the chosen Analysis Function colour palette in hex or rgb format.
@@ -46,7 +45,7 @@ def get_af_colours(
4645
4746
Returns
4847
-------
49-
List[Union[str, Tuple[int, int, int]]]
48+
list
5049
chosen_colours_list
5150
5251
"""
@@ -87,7 +86,7 @@ def get_af_colours(
8786

8887
def categorical_colours(
8988
categorical_hex_list: List[str], duo_hex_list: List[str], colour_format: str = "hex", number_of_colours: int = 2
90-
) -> List[Union[str, Tuple[int, int, int]]]:
89+
):
9190
"""
9291
Return the Analysis Function categorical colour palette as a list
9392
in hex or rgb format for up to 6 colours. If number_of_colours is
@@ -116,7 +115,7 @@ def categorical_colours(
116115
117116
Returns
118117
-------
119-
List[Union[str, Tuple[int, int, int]]]
118+
list
120119
categorical_colours_list
121120
122121
"""
@@ -142,7 +141,7 @@ def categorical_colours(
142141
return categorical_colours_list
143142

144143

145-
def duo_colours(duo_hex_list: List[str], colour_format: str = "hex") -> List[Union[str, Tuple[int, int, int]]]:
144+
def duo_colours(duo_hex_list: List[str], colour_format: str = "hex"):
146145
"""
147146
Return the Analysis Function duo colour palette as a list of 2
148147
colours in hex or rgb format. This function is also called by
@@ -159,7 +158,7 @@ def duo_colours(duo_hex_list: List[str], colour_format: str = "hex") -> List[Uni
159158
160159
Returns
161160
-------
162-
List[Union[str, Tuple[int, int, int]]]
161+
list
163162
duo_colours_list
164163
165164
"""
@@ -176,7 +175,7 @@ def duo_colours(duo_hex_list: List[str], colour_format: str = "hex") -> List[Uni
176175

177176
def sequential_colours(
178177
sequential_hex_list: List[str], colour_format: str = "hex"
179-
) -> List[Union[str, Tuple[int, int, int]]]:
178+
):
180179
"""
181180
Return the Analysis Function sequential colour palette as a list
182181
of 3 colours in hex or rgb format.
@@ -191,7 +190,7 @@ def sequential_colours(
191190
192191
Returns
193192
-------
194-
List[Union[str, Tuple[int, int, int]]]
193+
list
195194
sequential_colours_list
196195
197196
"""
@@ -206,7 +205,7 @@ def sequential_colours(
206205
return sequential_colours_list
207206

208207

209-
def focus_colours(focus_hex_list: List[str], colour_format: str = "hex") -> List[Union[str, Tuple[int, int, int]]]:
208+
def focus_colours(focus_hex_list: List[str], colour_format: str = "hex"):
210209
"""
211210
Return the Analysis Function focus colour palette as a list of 2
212211
colours in hex or rgb format.
@@ -221,7 +220,7 @@ def focus_colours(focus_hex_list: List[str], colour_format: str = "hex") -> List
221220
222221
Returns
223222
-------
224-
List[Union[str, Tuple[int, int, int]]]
223+
list
225224
focus_colours_list
226225
227226
"""

0 commit comments

Comments
 (0)