Skip to content

Commit

Permalink
fix: backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
34j committed Apr 19, 2024
1 parent 660eb97 commit c1d0732
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
18 changes: 17 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ opencv-python = "^4.9.0.80"
attrs = "^23.2.0"
scikit-learn = "^1.4.2"
numpy-quaternion = "^2023.0.3"
strenum = "^0.4.15"

[tool.poetry.group.dev.dependencies]
pytest = "^7.0"
Expand Down
7 changes: 4 additions & 3 deletions src/vr180_convert/cli.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from enum import StrEnum, auto
from enum import auto
from pathlib import Path

import cv2 as cv
import typer
from quaternion import * # noqa
from strenum import StrEnum
from typing_extensions import Annotated

from vr180_convert.transformer import * # noqa
Expand Down Expand Up @@ -58,10 +59,10 @@ def lr(
interpolation: Annotated[
_InterpolationFlags,
typer.Option(help="Interpolation method, defaults to lanczos4"),
] = _InterpolationFlags.INTER_LANCZOS4,
] = _InterpolationFlags.INTER_LANCZOS4, # type: ignore
boarder_mode: Annotated[
_BorderTypes, typer.Option(help="Border mode, defaults to constant")
] = _BorderTypes.BORDER_CONSTANT,
] = _BorderTypes.BORDER_CONSTANT, # type: ignore
boarder_value: int = 0,
radius: Annotated[
str, typer.Option(help="Radius of the fisheye image, defaults to 'auto'")
Expand Down
2 changes: 2 additions & 0 deletions src/vr180_convert/remapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from pathlib import Path
from typing import Literal, Sequence

Expand Down
2 changes: 2 additions & 0 deletions src/vr180_convert/testing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from colorsys import hls_to_rgb
from pathlib import Path

Expand Down
4 changes: 3 additions & 1 deletion src/vr180_convert/transformer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from abc import ABCMeta, abstractmethod
from typing import Any, Literal

Expand Down Expand Up @@ -47,7 +49,7 @@ def transform(
# -> tuple[NDArray, NDArray]:
# pass

def __mul__(self, other: "TransformerBase") -> "MultiTransformer":
def __mul__(self, other: TransformerBase) -> MultiTransformer:
"""Multiply two transformers together."""
if isinstance(self, MultiTransformer) and isinstance(other, MultiTransformer):
return MultiTransformer(
Expand Down

0 comments on commit c1d0732

Please sign in to comment.