From 4332cf14c05b03e789e00a5081fe4ae3acc85bd4 Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 16 Feb 2026 20:48:26 -0800 Subject: [PATCH] [ezdxf] add stubs --- stubs/ezdxf/__init__.pyi | 3 ++- stubs/ezdxf/entities.pyi | 7 ++++--- stubs/ezdxf/layouts.pyi | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/stubs/ezdxf/__init__.pyi b/stubs/ezdxf/__init__.pyi index 0198407..f25475f 100644 --- a/stubs/ezdxf/__init__.pyi +++ b/stubs/ezdxf/__init__.pyi @@ -1,4 +1,5 @@ -from typing import Any, TextIO, Iterable +from typing import Any, TextIO +from collections.abc import Iterable from .layouts import Modelspace, BlockRecords class Drawing: diff --git a/stubs/ezdxf/entities.pyi b/stubs/ezdxf/entities.pyi index c8e6a4b..2c6efa9 100644 --- a/stubs/ezdxf/entities.pyi +++ b/stubs/ezdxf/entities.pyi @@ -1,17 +1,18 @@ -from typing import Any, Iterable, Tuple, Sequence +from typing import Any +from collections.abc import Iterable, Sequence class DXFEntity: def dxfattribs(self) -> dict[str, Any]: ... def dxftype(self) -> str: ... class LWPolyline(DXFEntity): - def get_points(self) -> Iterable[Tuple[float, ...]]: ... + def get_points(self) -> Iterable[tuple[float, ...]]: ... class Polyline(DXFEntity): def points(self) -> Iterable[Any]: ... # has .xyz class Text(DXFEntity): - def get_placement(self) -> Tuple[int, Tuple[float, float, float]]: ... + def get_placement(self) -> tuple[int, tuple[float, float, float]]: ... def set_placement(self, p: Sequence[float], align: int = ...) -> Text: ... class Insert(DXFEntity): ... diff --git a/stubs/ezdxf/layouts.pyi b/stubs/ezdxf/layouts.pyi index 4e713e6..c9d12ad 100644 --- a/stubs/ezdxf/layouts.pyi +++ b/stubs/ezdxf/layouts.pyi @@ -1,4 +1,5 @@ -from typing import Any, Iterator, Sequence, Union, Iterable +from typing import Any +from collections.abc import Iterator, Sequence, Iterable from .entities import DXFEntity class BaseLayout: