Commit 416fd98
fix: use explicit None checks for client config to respect zero values (#623)
## Summary
- `max_retries`, `min_delay_between_retries_millis`, and `timeout_secs`
used `or` for defaults
- The `or` operator treats `0` as falsy, so `max_retries=0` silently
became `8`, `timeout_secs=0` became `360`, etc.
- Changed to `if x is not None else default` pattern to correctly
respect explicit zero values
## Test plan
- [ ] Verify existing unit tests pass
- [ ] Verify `ApifyClient(token='x', max_retries=0)` results in
`client.max_retries == 0`
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent fc4eed7 commit 416fd98
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments