🐶 fix ruff issues

This commit is contained in:
Ondřej Samohel 2024-11-13 14:10:01 +01:00
parent b64e0340d9
commit 794160f8e3
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 6 additions and 7 deletions

View file

@ -135,7 +135,7 @@ class FileLocations(TraitBase):
msg = (
f"Number of file locations ({len(self.file_paths) - 1}) "
"does not match frame range "
f"({tmp_frame_ranged.frame_end - tmp_frame_ranged.frame_start})"
f"({tmp_frame_ranged.frame_end - tmp_frame_ranged.frame_start})" # noqa: E501
)
raise TraitValidationError(self.name, msg)
@ -153,7 +153,7 @@ class FileLocations(TraitBase):
f"({sequence.frame_start}-{sequence.frame_end}) "
"in sequence trait does not match "
"frame range "
f"({tmp_frame_ranged.frame_start}-{tmp_frame_ranged.frame_end}) "
f"({tmp_frame_ranged.frame_start}-{tmp_frame_ranged.frame_end}) " # noqa: E501
"defined in files."
)
raise TraitValidationError(self.name, msg)

View file

@ -2,15 +2,14 @@
from __future__ import annotations
from enum import Enum, auto
from typing import TYPE_CHECKING, Annotated, ClassVar, Optional, Union
from typing import TYPE_CHECKING, ClassVar, Optional
from pydantic import Field, PlainSerializer
from pydantic import Field
from .representation import Representation
from .trait import MissingTraitError, TraitBase
if TYPE_CHECKING:
from decimal import Decimal
from .representation import Representation
class GapPolicy(Enum):

View file

@ -50,7 +50,7 @@ class InvalidTrait:
"""Invalid trait class."""
foo = "bar"
@pytest.fixture()
@pytest.fixture
def representation() -> Representation:
"""Return a traits data instance."""
return Representation(name="test", traits=[