Skip to content

fix: remove dead code in signals.py and unused constant in test_signals.py#245

Merged
fazxes merged 1 commit intomainfrom
evolve/dead-code-signals
Apr 9, 2026
Merged

fix: remove dead code in signals.py and unused constant in test_signals.py#245
fazxes merged 1 commit intomainfrom
evolve/dead-code-signals

Conversation

@fazxes
Copy link
Copy Markdown
Member

@fazxes fazxes commented Apr 9, 2026

Summary

  • Move datetime imports to module level in .recursive/engine/signals.py (was deferred inside try blocks and function bodies, inconsistently)
  • Remove unreachable eval_date fallback in sessions_since_eval: eval_ts is always a non-empty string (from strftime) when control reaches the comparison, so the if eval_ts else eval_date branch was dead
  • Remove unused _VALID_EVAL_CONTENT module-level constant from .recursive/tests/test_signals.py (the _make_eval() helper already builds equivalent content inline)

Closes task #245. Identified in PR #244 code review.

Test plan

  • make check passes (1156 tests, ruff, mypy, format all green)
  • No nightshift/ files modified (framework-zone only)
  • sessions_since_eval behaviour unchanged -- only the dead fallback path removed

…ls.py

- Move datetime imports to module level (was deferred inside try blocks)
- Remove unreachable eval_date fallback in sessions_since_eval (eval_ts
  is always non-empty from strftime, so the else branch was dead)
- Remove unused _VALID_EVAL_CONTENT constant from test_signals.py

Closes task #245.
@fazxes fazxes merged commit 8b8e903 into main Apr 9, 2026
7 checks passed
@fazxes fazxes deleted the evolve/dead-code-signals branch April 9, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant