Skip to content

Commit

Permalink
Use *Ruff* format.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jan 29, 2024
1 parent fcba9a8 commit 3afc53d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ repos:
- id: flynt
args: [--verbose]
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
rev: "5.13.2"
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.6"
rev: "v0.1.14"
hooks:
- id: ruff
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
rev: 24.1.1
hooks:
- id: black
language_version: python3.9
Expand Down
32 changes: 17 additions & 15 deletions colour_hdri/models/dng.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,21 +546,23 @@ def matrix_camera_space_to_XYZ(
analog_balance: ArrayLike,
M_forward_matrix_1: ArrayLike,
M_forward_matrix_2: ArrayLike,
chromatic_adaptation_transform: Literal[
"Bianco 2010",
"Bianco PC 2010",
"Bradford",
"CAT02 Brill 2008",
"CAT02",
"CAT16",
"CMCCAT2000",
"CMCCAT97",
"Fairchild",
"Sharp",
"Von Kries",
"XYZ Scaling",
]
| str = "Bradford",
chromatic_adaptation_transform: (
Literal[
"Bianco 2010",
"Bianco PC 2010",
"Bradford",
"CAT02 Brill 2008",
"CAT02",
"CAT16",
"CMCCAT2000",
"CMCCAT97",
"Fairchild",
"Sharp",
"Von Kries",
"XYZ Scaling",
]
| str
) = "Bradford",
) -> NDArrayFloat:
"""
Return the *Camera Space* to *CIE XYZ* matrix for given *xy* white
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ convention = "numpy"
"utilities/*" = ["EXE001", "INP"]
"utilities/unicode_to_ascii.py" = ["RUF001"]

[tool.ruff.format]
docstring-code-format = true

[build-system]
requires = [ "poetry_core>=1.0.0" ]
build-backend = "poetry.core.masonry.api"

0 comments on commit 3afc53d

Please sign in to comment.