ed
0d0b433a2e
refactor(app_controller): remove redundant hasattr(f, ...) defensive checks
Phase 3 (partial): self.files guarantee (FR4 row 1)
Before: 13 hasattr(f, ...) defensive checks in src/app_controller.py
After: 0 (self.files is GUARANTEED List[FileItem] per init at 1996-2005)
Delta: -13 sites
Per the spec's FR4 row 1: 'After Phase 3, self.files is GUARANTEED
List[FileItem]. Every hasattr(f, "path") check is redundant. Remove it.'
The init code at src/app_controller.py:1996-2005 already does the correct
isinstance check + FileItem.from_dict() pattern, so all 13 hasattr checks
on self.files / self.context_files are redundant defensive code.
Verification:
- audit_weak_types --strict: OK (107 <= 112 baseline)
- py_check_syntax src/app_controller.py: OK
- 59 tests pass (type_aliases, openai_schemas, rag_engine, file_item, etc.)
OUT OF SCOPE (deferred):
- 18 hasattr(f, 'path') checks in src/gui_2.py (Phase 3 follow-up)
- Phase 4: _do_generate return type
- Phase 5: rag_engine.search() return type
- Phase 6: 30 Optional[T] returns
- Phase 7: 59 Any params + 10 dict[str, Any] params
See TRACK_COMPLETION_cruft_elimination_20260627.md for full scope.
2026-06-26 04:35:49 -04:00
..
2026-06-15 14:29:07 -04:00
2026-06-21 22:39:14 -04:00
2026-03-08 13:55:32 -04:00
2026-06-21 14:12:03 -04:00
2026-06-08 23:40:27 -04:00
2026-06-25 09:29:24 -04:00
2026-06-24 18:27:24 -04:00
2026-06-25 13:23:55 -04:00
2026-06-24 10:23:54 -04:00
2026-06-04 19:42:04 -04:00
2026-05-16 17:02:14 -04:00
2026-06-26 04:35:49 -04:00
2026-03-10 00:24:03 -04:00
2026-06-12 21:27:44 -04:00
2026-06-21 19:18:14 -04:00
2026-06-15 14:49:59 -04:00
2026-06-16 10:16:17 -04:00
2026-06-18 23:04:19 -04:00
2026-06-24 12:54:36 -04:00
2026-03-10 00:23:03 -04:00
2026-05-10 15:59:32 -04:00
2026-03-08 03:05:15 -04:00
2026-06-15 19:34:20 -04:00
2026-06-18 15:36:53 -04:00
2026-03-06 14:52:10 -05:00
2026-06-08 23:41:43 -04:00
2026-06-08 20:59:27 -04:00
2026-06-21 08:41:37 -04:00
2026-06-24 16:24:53 -04:00
2026-06-24 16:24:53 -04:00
2026-06-24 16:24:53 -04:00
2026-06-25 19:24:42 -04:00
2026-06-24 16:24:53 -04:00
2026-06-20 12:33:55 -04:00
2026-03-08 13:46:38 -04:00
2026-06-21 22:39:14 -04:00
2026-06-10 23:34:33 -04:00
2026-06-15 20:41:12 -04:00
2026-06-20 17:20:40 -04:00
2026-06-19 19:35:17 -04:00
2026-06-20 17:20:40 -04:00
2026-06-21 09:10:44 -04:00
2026-06-20 02:55:37 -04:00
2026-06-17 16:58:19 -04:00
2026-06-18 14:06:09 -04:00
2026-06-17 01:57:52 -04:00
2026-06-12 21:30:47 -04:00
2026-06-13 16:45:23 -04:00
2026-06-19 20:35:19 -04:00
2026-05-13 11:24:58 -04:00
2026-06-19 14:30:43 -04:00
2026-06-20 07:46:10 -04:00
2026-03-10 00:18:12 -04:00
2026-06-25 21:24:39 -04:00
2026-03-08 13:49:43 -04:00
2026-06-06 00:42:40 -04:00
2026-06-06 00:42:40 -04:00