fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
18 lines
423 B
Python
18 lines
423 B
Python
from typing import Optional
|
|
|
|
|
|
def pick_bool(*values: Optional[bool]) -> bool:
|
|
"""Pick the first non-none bool or return the last value.
|
|
|
|
Args:
|
|
*values (bool): Any number of boolean or None values.
|
|
|
|
Returns:
|
|
bool: First non-none boolean.
|
|
"""
|
|
assert values, "1 or more values required"
|
|
for value in values:
|
|
if value is not None:
|
|
return value
|
|
return bool(value)
|