File tree Expand file tree Collapse file tree 10 files changed +16
-14
lines changed Expand file tree Collapse file tree 10 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ repos:
1515 - id : requirements-txt-fixer
1616 - id : trailing-whitespace
1717 - repo : https://github.com/codespell-project/codespell
18- rev : v2.3.0
18+ rev : v2.4.1
1919 hooks :
2020 - id : codespell
2121 args : ["--ignore-words-list=socio-economic"]
2222 exclude : " BIBLIOGRAPHY.bib|CONTRIBUTORS.rst|.*.ipynb"
2323 - repo : https://github.com/PyCQA/isort
24- rev : " 5.13.2 "
24+ rev : " 6.0.1 "
2525 hooks :
2626 - id : isort
2727 - repo : https://github.com/astral-sh/ruff-pre-commit
28- rev : " v0.8.2 "
28+ rev : " v0.12.4 "
2929 hooks :
3030 - id : ruff-format
3131 - id : ruff
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def as_array(self) -> npt.NDArray:
176176 Array of shape `dim` with the data from `values`.
177177 """
178178
179- import numpy as np
179+ import numpy as np # noqa: PLC0415
180180
181181 dim = self .dim
182182 # Strip the dimensions with value 1.
Original file line number Diff line number Diff line change 1717
1818def assert_snippet_consistency (snippet : str ) -> None :
1919 """
20- Evaluate the snippet with multiple values anc check that they are the same as the
20+ Evaluate the snippet with multiple values and check that they are the same as the
2121 `ociochecklut` tools output.
2222 """
2323 for rgb in rgb_sample_iter ():
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ def ocio_output_for_file(
6666 """Apply a color transform file to a flattened, one-dimensional list of
6767 R,G,B values.
6868 """
69- import PyOpenColorIO as ocio
69+
70+ import PyOpenColorIO as ocio # noqa: PLC0415
7071
7172 xform = ocio .FileTransform (src = path ) # pyright: ignore[reportAttributeAccessIssue]
7273 cpu = ocio .GetCurrentConfig ().getProcessor (xform ).getDefaultCPUProcessor () # pyright: ignore[reportAttributeAccessIssue]
Original file line number Diff line number Diff line change 1717
1818def assert_snippet_consistency (snippet : str ) -> None :
1919 """
20- Evaluate the snippet with multiple values anc check that they are the same as the
20+ Evaluate the snippet with multiple values and check that they are the same as the
2121 `ociochecklut` tools output.
2222 """
2323 for rgb in rgb_sample_iter ():
Original file line number Diff line number Diff line change 1717
1818def assert_snippet_consistency (snippet : str , decimals : int = 5 ) -> None :
1919 """
20- Evaluate the snippet with multiple values anc check that they are the same as the
20+ Evaluate the snippet with multiple values and check that they are the same as the
2121 `ociochecklut` tools output.
2222 """
2323 for rgb in rgb_sample_iter ():
Original file line number Diff line number Diff line change @@ -191,7 +191,8 @@ def validate_clf_schema_smtp_st2136_1(doc: str) -> ValidationResult:
191191 :class:`bool`
192192 Whether the document is valid according to the schema.
193193 """
194- import pytest
194+
195+ import pytest # noqa: PLC0415
195196
196197 if not st2136_1a_202x_schema_available ():
197198 pytest .skip ("Schema not available for validation." )
Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ def test_CLF_from_OCIO(self) -> None:
687687 Test parsing of a *CLF* file written by OpenColorIO.
688688 """
689689
690- import PyOpenColorIO as ocio
690+ import PyOpenColorIO as ocio # noqa: PLC0415
691691
692692 ocio_transform = (
693693 ocio .Config () # pyright: ignore[reportAttributeAccessIssue]
Original file line number Diff line number Diff line change @@ -130,9 +130,9 @@ def inner(text: str) -> str:
130130 """Format and pads inner text for the message box."""
131131
132132 return (
133- f'* { " " * padding } '
134- f' { text } { " " * (width - len (text ) - padding * 2 - 2 )} '
135- f' { " " * padding } *'
133+ f"* { ' ' * padding } "
134+ f" { text } { ' ' * (width - len (text ) - padding * 2 - 2 )} "
135+ f" { ' ' * padding } *"
136136 )
137137
138138 print_callable ("=" * width )
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def extract_todo_items(root_directory: str) -> dict:
8181
8282 if in_todo and line .startswith ("#" ):
8383 todo_item .append (line .replace ("#" , "" ).strip ())
84- elif len ( todo_item ) :
84+ elif todo_item :
8585 key = filename .replace ("../" , "" )
8686 if not todo_items .get (key ):
8787 todo_items [key ] = []
You can’t perform that action at this time.
0 commit comments