typing: modernize Generator annotations

`None, None` assumed by default.
Though this was introduced in Python 3.13, before 3.13 it only breaks if we'd do `typing.Generator[T]` (which is deprecated) -`collections.abc.Generator[T]` works fine, it seems it never had an arity check.
This commit is contained in:
Andrej730
2026-09-02 15:42:12 +05:00
parent 261d2ce9a2
commit 4eb093eefa
11 changed files with 25 additions and 31 deletions
+1 -1
View File
@@ -855,7 +855,7 @@ class file_mixin:
self.transaction.unbatch()
return self.unbatch()
def __iter__(self) -> Generator[ifcopenshell.entity_instance, None, None]:
def __iter__(self) -> Generator[ifcopenshell.entity_instance]:
return iter(self[id] for id in self.entity_names())
def assign_header_from(self, other: ifcopenshell.file) -> None: