Skip to content

more robust flatten on joining project lists#1994

Merged
tsmathis merged 6 commits into
masterfrom
safe-maybe-flatten
Jan 28, 2026
Merged

more robust flatten on joining project lists#1994
tsmathis merged 6 commits into
masterfrom
safe-maybe-flatten

Conversation

@tsmathis

Copy link
Copy Markdown
Collaborator

^title

from:

ret["data"].extend([resp["result"]["data"] for resp in responses.values()])
return ret["data"]

to:

return list(
itertools.chain.from_iterable(
[
ret["data"],
[resp["result"]["data"] for resp in responses.values()][0],
]
)
)

open question on safeness of the explicit index into the response list for users running the client

@esoteric-ephemera

Copy link
Copy Markdown
Collaborator

@tsmathis made some changes here for hopefully safer key access - should just return no data if those keys aren't there

also tried to prevent the client from modifying queries in place, since this was a barrier to us testing what was going wrong

@tsmathis

Copy link
Copy Markdown
Collaborator Author

nice, will test!

@tsmathis
tsmathis merged commit 1feaca1 into master Jan 28, 2026
6 checks passed
@tsmathis
tsmathis deleted the safe-maybe-flatten branch January 28, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants