Full category (not just the ruff-0.16 default subset). 35 hits:
- 4 PLW0108 (unnecessary lambda) autofixed
- 6 PLW2901 (loop/with variable shadowed) renamed to distinct names
- 2 PLW1510 (subprocess.run without explicit check) given check=False,
matching existing behavior exactly
- 6 PLW0602 (global declared but never assigned) removed - these were
all in-place mutations (.append/.insert), not reassignments, so
`global` was already a no-op
- 7 PLW0603 (global statement) suppressed with noqa - these are
genuine lazy-init singletons with no class to hold the state;
refactoring them is a separate, larger change
- 6 PLW1508 (non-str/None env var default) fixed using the existing
get_int_from_env/get_float_from_env typed helpers instead of raw
os.getenv, which also fixes a real bug: LOGROTATE_MAX_SIZE and
LOGROTATE_MAX_BACKUPS were never wrapped in int(), so a string env
var value would have flowed into RotatingFileHandler as a string
- 1 PLW1641 (__eq__ without __hash__) fixed by adding __hash__ to
PlaceholderString
Implements and tests a retry with backoff + jitter for aquring the index update lock. If we still can't get it, dispatch a celery task to handle it later instead (also with retry)
Signed-off-by: stumpylog <797416+stumpylog@users.noreply.github.com>