Why this matters
Improves readability and reduces drift across call sites.
Move magic values (strings, thresholds, paths) to module-level constants with descriptive names.
Improves readability and reduces drift across call sites.
Side-by-side examples engineers can pattern-match during review.
if status == 'archived': ...ARCHIVED = 'archived'
if status == ARCHIVED: ...if level > 3: ...MAX_RETRIES = 3; if level > MAX_RETRIES: ...From the same buckets as this rule.