Skip to content

cleanup: dead code, F401/F841 enforcement, Z-timestamp bug fix#151

Merged
johnnichev merged 1 commit into
mainfrom
cleanup/first-cut-deadcode-timestamp
Jun 15, 2026
Merged

cleanup: dead code, F401/F841 enforcement, Z-timestamp bug fix#151
johnnichev merged 1 commit into
mainfrom
cleanup/first-cut-deadcode-timestamp

Conversation

@johnnichev

Copy link
Copy Markdown
Owner

First cut of the post-1.0 code-cleanup backlog (#150). Everything here is internal/private — no public symbol is touched, the 1.0 frozen API is unchanged. Net -32 lines across 61 files.

Closes #135, #136, #137, #138. Advances #149.

Bugs fixed

Hygiene

Verification

  • Full suite: 7650 passed, 159 skipped, 0 failed, 0 errors (Python 3.11).
  • mypy src/selectools clean (182 files including the new _time.py).
  • ruff check + ruff format --check clean; stability audit map unchanged.

Notes

The DRY consolidation is deliberately scoped to the one item that also closed a bug (the timestamp helper). The larger DRY items in the backlog (#139 LLM-judge scaffold, #140 session validators, #141 import guards, etc.) are left as separate follow-ups.

Changelog entry is under [Unreleased]; this is release-ready as a 1.0.1 patch whenever you want to tag it.

First cut of the post-1.0 cleanup backlog. All internal/private; no public
symbol affected, API stays frozen.

Fixes:
- Knowledge/checkpoint loaders crashed on Z-suffixed timestamps on Python 3.10
  (fromisoformat rejected the trailing Z until 3.11). All 17 ISO-parse sites now
  route through a single selectools._time.parse_iso helper. (#136)
- selectools doctor printed the OK/MISSING icon but dropped the set/not-set
  status text it computed; now shows both. (#135)

Internal:
- Removed dead code: 3 unused serve dataclasses, 2 unreachable private helpers,
  4 dead locals, 104 unused imports. (#137)
- Enforced ruff F401 + F841 everywhere; scoped the F401 ignore to **/__init__.py
  re-export hubs so dead imports/locals can't accumulate silently. (#138)
- Documented PineconeVectorStore(environment=...) as deprecated/ignored. (#149)

Full suite: 7650 passed, 159 skipped, 0 failed. mypy clean, ruff + format clean.
@johnnichev johnnichev merged commit 83b4f01 into main Jun 15, 2026
8 checks passed
@johnnichev johnnichev deleted the cleanup/first-cut-deadcode-timestamp branch June 15, 2026 22:08
johnnichev added a commit that referenced this pull request Jun 15, 2026
Cleanup & Z-timestamp patch. Bumps version 1.0.0 -> 1.0.1 and rolls the
[Unreleased] changelog into a dated [1.0.1] section.

Contents already merged via #151: Z-suffix timestamp crash fix on Python 3.10
(#136), doctor status text (#135), dead-code removal (#137), ruff F401/F841
enforcement (#138). All internal; frozen 1.0 API unchanged.
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.

selectools status: CLI computes a status string then prints the wrong variable

1 participant