Skip to content

Commit 3b4b96f

Browse files
authored
style: fix invalid type hint (#163)
* style: fix wrong type hint Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * style: rename variable Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
1 parent a7c5802 commit 3b4b96f

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

t4_devkit/cli/sanity.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def _run_sanity_check(
2626
) -> list[DBException]:
2727
exceptions: list[DBException] = []
2828

29-
db_dirs: list[Path] = Path(db_parent).glob("*")
30-
31-
for db_root in tqdm(db_dirs, desc=">>>Sanity checking..."):
29+
for db_root in tqdm(Path(db_parent).glob("*"), desc=">>>Sanity checking..."):
3230
result = sanity_check(db_root, revision=revision, include_warning=include_warning)
3331
if result:
3432
exceptions.append(result)

t4_devkit/common/converter.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111
__all__ = ["to_quaternion"]
1212

1313

14-
def to_quaternion(value: ArrayLike | NDArray) -> Quaternion:
14+
def to_quaternion(x: ArrayLike | NDArray) -> Quaternion:
1515
"""Convert input rotation like array to `Quaternion`.
1616
1717
Args:
18-
value (ArrayLike | NDArray): Rotation matrix or quaternion.
18+
x (ArrayLike | NDArray): Rotation matrix or quaternion.
1919
2020
Returns:
2121
Quaternion: Converted instance.
2222
"""
23-
return (
24-
Quaternion(matrix=value)
25-
if isinstance(value, np.ndarray) and value.ndim == 2
26-
else Quaternion(value)
27-
)
23+
return Quaternion(matrix=x) if isinstance(x, np.ndarray) and x.ndim == 2 else Quaternion(x)

0 commit comments

Comments
 (0)