diff --git a/vanilla_roll/anatomy_orientation.py b/vanilla_roll/anatomy_orientation.py index e158157..5b1d269 100644 --- a/vanilla_roll/anatomy_orientation.py +++ b/vanilla_roll/anatomy_orientation.py @@ -14,7 +14,7 @@ class Axial(Enum): @classmethod def of(cls, s: Literal["Superior"] | Literal["Inferior"]) -> Axial: - """construct from string. + """Construct from string. >>> Axial.of("Superior") @@ -22,7 +22,7 @@ def of(cls, s: Literal["Superior"] | Literal["Inferior"]) -> Axial: return cls(s) def inverse(self) -> Axial: - """get inverse. + """Get inverse. >>> Axial.SUPERIOR.inverse() @@ -36,7 +36,7 @@ class Sagittal(Enum): @classmethod def of(cls, s: Literal["Anterior"] | Literal["Posterior"]) -> Sagittal: - """construct from string. + """Construct from string. >>> Sagittal.of("Anterior") @@ -57,7 +57,7 @@ class Coronal(Enum): @classmethod def of(cls, s: Literal["Right"] | Literal["Left"]) -> Coronal: - """construct from string. + """Construct from string. >>> Coronal.of("Right") diff --git a/vanilla_roll/geometry/conversion.py b/vanilla_roll/geometry/conversion.py index bcc4ce6..e59cfc2 100644 --- a/vanilla_roll/geometry/conversion.py +++ b/vanilla_roll/geometry/conversion.py @@ -12,25 +12,20 @@ class Conversion(Protocol): @overload - def __call__(self, target: Vector) -> Vector: - ... + def __call__(self, target: Vector) -> Vector: ... @overload - def __call__(self, target: Orientation) -> Orientation: - ... + def __call__(self, target: Orientation) -> Orientation: ... @overload - def __call__(self, target: Frame) -> Frame: - ... + def __call__(self, target: Frame) -> Frame: ... @overload - def __call__(self, target: xp.Array) -> xp.Array: - ... + def __call__(self, target: xp.Array) -> xp.Array: ... def __call__( self, target: Vector | Orientation | Frame | xp.Array - ) -> Vector | Orientation | Frame | xp.Array: - ... + ) -> Vector | Orientation | Frame | xp.Array: ... def _transform_vector( @@ -115,20 +110,16 @@ def __init__(self, src: Frame, dst: Frame) -> None: self._dst_frame_mat = as_array(dst) @overload - def __call__(self, target: Vector) -> Vector: - ... + def __call__(self, target: Vector) -> Vector: ... @overload - def __call__(self, target: Orientation) -> Orientation: - ... + def __call__(self, target: Orientation) -> Orientation: ... @overload - def __call__(self, target: Frame) -> Frame: - ... + def __call__(self, target: Frame) -> Frame: ... @overload - def __call__(self, target: xp.Array) -> xp.Array: - ... + def __call__(self, target: xp.Array) -> xp.Array: ... def __call__(self, target: Vector | Orientation | Frame | xp.Array): match target: @@ -203,20 +194,16 @@ def __init__(self, order: tuple[int, int, int]) -> None: self._order = order @overload - def __call__(self, target: Vector) -> Vector: - ... + def __call__(self, target: Vector) -> Vector: ... @overload - def __call__(self, target: Orientation) -> Orientation: - ... + def __call__(self, target: Orientation) -> Orientation: ... @overload - def __call__(self, target: Frame) -> Frame: - ... + def __call__(self, target: Frame) -> Frame: ... @overload - def __call__(self, target: xp.Array) -> xp.Array: - ... + def __call__(self, target: xp.Array) -> xp.Array: ... def __call__(self, target: Vector | Orientation | Frame | xp.Array): match target: diff --git a/vanilla_roll/rendering/composition.py b/vanilla_roll/rendering/composition.py index 9758e4c..92b2dc1 100644 --- a/vanilla_roll/rendering/composition.py +++ b/vanilla_roll/rendering/composition.py @@ -22,11 +22,9 @@ def add( *, mask: xp.Array | None = None, slice: Slice2d | None = None, - ) -> None: - ... + ) -> None: ... - def compose(self) -> Image: - ... + def compose(self) -> Image: ... class AccMax(Composer): diff --git a/vanilla_roll/rendering/types.py b/vanilla_roll/rendering/types.py index 7838e6b..69707cf 100644 --- a/vanilla_roll/rendering/types.py +++ b/vanilla_roll/rendering/types.py @@ -34,5 +34,4 @@ def __call__( self, camera: Camera, spacing: float | None = ..., - ) -> RenderingResult: - ... + ) -> RenderingResult: ... diff --git a/vanilla_roll/validation.py b/vanilla_roll/validation.py index 6ae8e3b..e2d32b8 100644 --- a/vanilla_roll/validation.py +++ b/vanilla_roll/validation.py @@ -5,8 +5,7 @@ class ValidationRule(Protocol): """ValidationRule is a protocol that defines a validation rule.""" - def __call__(self, name: str, other: Any) -> ValueError | None: - ... + def __call__(self, name: str, other: Any) -> ValueError | None: ... class IsGreaterThan: