diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd3f6d4..5c9aa09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,18 +41,18 @@ repos: # files: .pre-commit-config.yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.21.1 + rev: v3.21.2 hooks: - args: - --py310-plus id: pyupgrade - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 + rev: v1.5.6 hooks: - id: remove-tabs -- repo: https://github.com/charliermarsh/ruff-pre-commit +- repo: https://github.com/astral-sh/ruff-pre-commit # ignores # COM812 Trailing comma missing (does not agree with Black) # D203 1 blank line required before class docstring (incompatible with D211) @@ -64,7 +64,7 @@ repos: # N802 function name should be lowercase # N803 argument name should be lowercase # ICN001 import numpy as np - rev: 'v0.14.4' + rev: 'v0.16.0' hooks: - id: ruff exclude: "tests" @@ -81,6 +81,6 @@ repos: # reads pyproject.toml for additional config - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.407 + rev: v1.1.411 hooks: - id: pyright diff --git a/src/basic_colormath/distance.py b/src/basic_colormath/distance.py index 31d41b2..e3d6711 100644 --- a/src/basic_colormath/distance.py +++ b/src/basic_colormath/distance.py @@ -36,7 +36,7 @@ import math from basic_colormath.conversion import hex_to_rgb -from basic_colormath.type_hints import Hex, Lab, LabLike, RgbLike, Rgb +from basic_colormath.type_hints import Hex, Lab, LabLike, Rgb, RgbLike _Triple = tuple[float, float, float] @@ -183,6 +183,7 @@ def rgb_to_lab(rgb: RgbLike) -> Lab: xyz = _rgb_to_xyz(rgb) return _xyz_to_lab(xyz) + def lab_to_rgb(lab: LabLike) -> Rgb: """Convert Lab to RGB. @@ -336,7 +337,6 @@ def get_delta_e_hex(hex_a: Hex, hex_b: Hex) -> float: if __name__ == "__main__": - import random for _i in range(1000):