refactor(anthropic): use PEP 604 optional typing for reasoning effort flag

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hx 2026-09-05 10:48:46 +08:00
parent 69e374a951
commit f704f3f799

View file

@ -57,7 +57,7 @@ def normalize_reasoning_effort_value(
except Exception:
model_info = None
def _flag(key: str) -> Optional[bool]:
def _flag(key: str) -> bool | None:
"""Return the flag value, or None when not declared."""
if not model_info:
return None