`hints` with the `| Omit` that every optional field of a thread params type adds to the type `create()` gives it.
(hints: dict[str, Any])
| 2248 | |
| 2249 | |
| 2250 | def without_omit(hints: dict[str, Any]) -> dict[str, Any]: |
| 2251 | """`hints` with the `| Omit` that every optional field of a thread params type adds to the type `create()` gives it.""" |
| 2252 | assert all(Omit in get_args(hint) for hint in hints.values()) |
| 2253 | return { |
| 2254 | field: reduce(operator.or_, (member for member in get_args(hint) if member is not Omit)) |
| 2255 | for field, hint in hints.items() |
| 2256 | } |
| 2257 | |
| 2258 | |
| 2259 | def run_turn(thread: BetaMessageThread[Any], method: str, *messages: BetaMessageParam, **overrides: Any) -> None: |
no test coverage detected