Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pursue a part of #1030, so it becomes part of the next release #1074

Merged
merged 8 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/fixtures/wrapper/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

obj = Wrapper(
alpha='ααα',
bravo=[
bravo=iter([
1,
2,
],
]),
charlie=[
Charlie(
value='δδδ',
Expand Down
3 changes: 2 additions & 1 deletion xsdata/utils/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Any,
Callable,
Dict,
Generator,
Iterable,
Iterator,
List,
Expand All @@ -20,7 +21,7 @@ def is_array(value: Any) -> bool:
if isinstance(value, tuple):
return not hasattr(value, "_fields")

return isinstance(value, (list, set, frozenset))
return isinstance(value, (list, set, frozenset, Generator))


def unique_sequence(items: Iterable[T], key: Optional[str] = None) -> List[T]:
Expand Down
Loading