Fix missing serializer_settings argument #5299

This commit is contained in:
Andrej730
2024-09-04 18:29:51 +05:00
parent 0ab70827e5
commit b0eaf23d2c
@@ -446,6 +446,7 @@ def iterate(
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
with_progress: Literal[False] = False,
cache: Optional[serializers.hdf5] = None,
serializer_settings: Optional[serializer_settings] = None,
geometry_library: GEOMETRY_LIBRARY = "opencascade",
) -> Generator[IteratorOutput, None, None]: ...
@overload
@@ -457,6 +458,7 @@ def iterate(
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
with_progress: Literal[True] = True,
cache: Optional[serializers.hdf5] = None,
serializer_settings: Optional[serializer_settings] = None,
geometry_library: GEOMETRY_LIBRARY = "opencascade",
) -> Generator[tuple[int, IteratorOutput], None, None]: ...
@overload
@@ -468,6 +470,7 @@ def iterate(
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
with_progress: bool = False,
cache: Optional[serializers.hdf5] = None,
serializer_settings: Optional[serializer_settings] = None,
geometry_library: GEOMETRY_LIBRARY = "opencascade",
) -> Generator[Union[IteratorOutput, tuple[int, IteratorOutput]], None, None]: ...
def iterate(
@@ -478,11 +481,12 @@ def iterate(
exclude: Optional[Union[list[entity_instance], list[str]]] = None,
with_progress: bool = False,
cache: Optional[serializers.hdf5] = None,
serializer_settings: Optional[serializer_settings] = None,
geometry_library: GEOMETRY_LIBRARY = "opencascade",
) -> Generator[Union[IteratorOutput, tuple[int, IteratorOutput]], None, None]:
it = iterator(settings, file_or_filename, num_threads, include, exclude, geometry_library)
if cache:
hdf5_cache = serializers.hdf5(cache, settings)
hdf5_cache = serializers.hdf5(cache, settings, serializer_settings)
it.set_cache(hdf5_cache)
yield from consume_iterator(it, with_progress=with_progress)