Skip to content

Commit 063bb39

Browse files
committed
ignore mypy issues
1 parent 5847c88 commit 063bb39

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/ezdxf/math/linalg.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,17 +311,17 @@ def __mul__(self, other: Matrix | float) -> Matrix:
311311
if isinstance(other, Matrix):
312312
return Matrix(matrix=np.matmul(self.matrix, other.matrix))
313313
else:
314-
matrix = Matrix(matrix=self.matrix * float(other))
314+
matrix = Matrix(matrix=self.matrix * float(other)) # type: ignore
315315
return matrix
316316

317317
__imul__ = __mul__
318318

319319
def __add__(self, other: Matrix | float) -> Matrix:
320320
"""Matrix addition by another matrix or a float, returns a new matrix."""
321321
if isinstance(other, Matrix):
322-
return Matrix(matrix=self.matrix + other.matrix)
322+
return Matrix(matrix=self.matrix + other.matrix) # type: ignore
323323
else:
324-
return Matrix(matrix=self.matrix + float(other))
324+
return Matrix(matrix=self.matrix + float(other)) # type: ignore
325325

326326
__iadd__ = __add__
327327

@@ -331,9 +331,9 @@ def __sub__(self, other: Matrix | float) -> Matrix:
331331
332332
"""
333333
if isinstance(other, Matrix):
334-
return Matrix(matrix=self.matrix - other.matrix)
334+
return Matrix(matrix=self.matrix - other.matrix) # type: ignore
335335
else:
336-
return Matrix(matrix=self.matrix - float(other))
336+
return Matrix(matrix=self.matrix - float(other)) # type: ignore
337337

338338
__isub__ = __sub__
339339

@@ -346,7 +346,7 @@ def inverse(self) -> Matrix:
346346
if self.nrows != self.ncols:
347347
raise TypeError("Inverse of non-square matrix not supported.")
348348
try:
349-
return Matrix(matrix=np.linalg.inv(self.matrix))
349+
return Matrix(matrix=np.linalg.inv(self.matrix)) # type: ignore
350350
except np.linalg.LinAlgError:
351351
raise ZeroDivisionError
352352

@@ -445,7 +445,7 @@ def numpy_matrix_solver(A: MatrixData | NDArray, B: MatrixData | NDArray) -> Mat
445445
"""
446446
mat_A = np.array(A, dtype=np.float64)
447447
mat_B = np.array(B, dtype=np.float64)
448-
return Matrix(matrix=np.linalg.solve(mat_A, mat_B))
448+
return Matrix(matrix=np.linalg.solve(mat_A, mat_B)) # type: ignore
449449

450450

451451
def numpy_vector_solver(A: MatrixData | NDArray, B: Iterable[float]) -> list[float]:
@@ -486,7 +486,7 @@ def solve_matrix(self, B: MatrixData | NDArray) -> Matrix:
486486
487487
"""
488488
mat_B = np.array(B, dtype=np.float64)
489-
return Matrix(matrix=np.linalg.solve(self.mat_A, mat_B))
489+
return Matrix(matrix=np.linalg.solve(self.mat_A, mat_B)) # type: ignore
490490

491491
def solve_vector(self, B: Iterable[float]) -> list[float]:
492492
"""Solves the linear equation system given by the nxn Matrix

src/ezdxf/npshapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def to_list(self) -> list[list[float]]:
113113
"""Returns the shape vertices as list of lists
114114
e.g. [[1, 2], [3, 4], ...]
115115
"""
116-
return self._vertices.tolist()
116+
return self._vertices.tolist() # type: ignore
117117

118118
def bbox(self) -> BoundingBox2d:
119119
"""Returns the bounding box of all vertices."""

src/ezdxf/render/trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def from_spline(
338338
spline.derivatives(t, n=1), np.linspace(start_width, end_width, count)
339339
):
340340
normal = Vec2(derivative).orthogonal(True)
341-
curve_trace._append(Vec2(point), normal, width)
341+
curve_trace._append(Vec2(point), normal, width) # type: ignore
342342
return curve_trace
343343

344344
@classmethod
@@ -373,7 +373,7 @@ def from_arc(
373373
arc.vertices(arc.angles(count)),
374374
np.linspace(start_width, end_width, count),
375375
):
376-
curve_trace._append(point, point - center, width)
376+
curve_trace._append(point, point - center, width) # type: ignore
377377
return curve_trace
378378

379379
def _append(self, point: Vec2, normal: Vec2, width: float) -> None:

0 commit comments

Comments
 (0)