From 6d9a227ee77a7c1c800970b2184e7a344881780e Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Tue, 14 Jun 2022 23:57:08 -0400 Subject: [PATCH] Add missing docstring params --- colorsys.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/colorsys.py b/colorsys.py index ea868ac..0cdeea3 100644 --- a/colorsys.py +++ b/colorsys.py @@ -42,7 +42,13 @@ def hls_to_rgb(hue: float, light: float, sat: float) -> Tuple[float, float, float]: - """Converts HLS to RGB values""" + """Converts HLS to RGB values + + :param float hue: The hue of the color to convert + :param float light: The lightness of the color to convert + :param float sat: The saturation of the color to convert + """ + if sat == 0.0: return light, light, light if light <= 0.5: @@ -77,7 +83,12 @@ def _v(chroma1: float, chroma2: float, hue: float) -> float: def hsv_to_rgb( # pylint: disable=too-many-return-statements,inconsistent-return-statements hue: float, sat: float, val: float ) -> Tuple[float, float, float]: - """Converts HSV to RGB values""" + """Converts HSV to RGB values + + :param float hue: The hue of the color to convert + :param float sat: The saturation of the color to convert + :param float val: The value (or brightness) of the color to convert + """ if sat == 0.0: return val, val, val i = int(hue * 6.0) # assume int() truncates!