8000 keep refactoring · Robertleoj/spatialmath-python@b959426 · GitHub
[go: up one dir, main page]

Skip to content

Commit b959426

Browse files
committed
keep refactoring
1 parent 3b54b75 commit b959426

23 files changed

+1241
-1323
lines changed

poetry.lock

Lines changed: 2 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ classifiers = [
3838
]
3939

4040
[tool.poetry.dependencies]
41-
python = ">=3.10"
41+
python = ">=3.11"
4242
numpy = ">=2.1.0"
4343
scipy = "*"
4444
matplotlib = ">=3.9.3"

spatialmath/DualQuaternion.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22
import numpy as np
3-
from spatialmath import Quaternion, UnitQuaternion, SE3
3+
from spatialmath import Quaternion, UnitQuaternion
44
from spatialmath import base
5-
from spatialmath.base.types import *
5+
from spatialmath.base.types import ArrayLike3, R8x8, R8
6+
from typing import Self, overload
67

78
# TODO scalar multiplication
89

@@ -97,7 +98,7 @@ def __str__(self) -> str:
9798
"""
9899
return str(self.real) + " + ε " + str(self.dual)
99100

100-
def norm(self) -> Tuple[float, float]:
101+
def norm(self) -> tuple[float, float]:
101102
"""
102103
Norm of a dual quaternion
103104
@@ -269,6 +270,7 @@ class UnitDualQuaternion(DualQuaternion):
269270
@overload
270271
def __init__(self, T: SE3): ...
271272

273+
@overload
272274
def __init__(self, real: Quaternion, dual: Quaternion): ...
273275

274276
def __init__(self, real=None, dual=None):

spatialmath/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from spatialmath.pose2d import SO2, SE2
44
from spatialmath.pose3d import SO3, SE3
5+
import importlib.metadata
56
from spatialmath.baseposematrix import BasePoseMatrix
67
from spatialmath.geom2d import Line2, LineSegment2, Polygon2, Ellipse
78
from spatialmath.geom3d import Line3, Plane3
@@ -49,9 +50,5 @@
4950
"SplineFit",
5051
]
5152

52-
try:
53-
import importlib.metadata
5453

55-
__version__ = importlib.metadata.version("spatialmath-python")
56-
except:
57-
pass
54+
__version__ = importlib. 3212 metadata.version("spatialmath-python")

0 commit comments

Comments
 (0)
0