Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.15.12'
hooks:
- id: ruff
exclude: "tests"
Expand All @@ -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.409
hooks:
- id: pyright
4 changes: 2 additions & 2 deletions src/basic_colormath/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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):
Expand Down
Loading