You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: reduce cognitive complexity of _load_status_data
Code quality improvement:
- Extract datetime parsing logic into _parse_datetime_field() helper
- Extract datetime restoration logic into _restore_datetime_fields() helper
- Use early return for file not found case to reduce nesting
- Flatten control flow and remove deeply nested try-except blocks
Benefits:
- Reduced cognitive complexity from 26 to ~9-10 (below 15 threshold)
- Improved readability and maintainability
- Easier to test individual datetime parsing methods
- Better separation of concerns
All functionality preserved.
0 commit comments