Repository navigation
Release v0.8.0 — Release Notes
TopMark v0.8.0
Release date: 2025-09-24
Breaking changes: None
🚀 Highlights
- C-style block header support — New
CBlockHeaderProcessorenables/* … */headers (with per-line*) and tolerant directive detection. - Python stub files —
.pyinow use thePoundHeaderProcessor(#style) with sensible defaults (no shebang).
✨ Added
- Processors
CBlockHeaderProcessor(/* … */) with toleranttopmark:directive detection (accepts* topmark:…or baretopmark:…).- File type registrations: CSS, SCSS, Less, Stylus, SQL, Solidity.
- File types
python-stub(.pyi) bound toPoundHeaderProcessor(shebang disabled; blank after header enforced).
- Tests
- Comprehensive
test_cblock.py: insertion (top & offset), tolerant detection, idempotency, CRLF preservation, strip (auto/explicit span), and parametric checks across all registered extensions.
- Comprehensive
🔧 Changed
- Typing hardening (non-functional):
- Widespread strict typing across
pipeline/,cli/,cli_shared/, remainingsrc/modules, andtools/. - Adopt postponed annotations; move type-only imports under
TYPE_CHECKING. - Introduce
TopmarkLoggerannotations; add precise return/locals typing and import hygiene for Pyright strict mode.
- Widespread strict typing across
🐛 Fixed
- CLI
processorscommand:- Treat
filetypesas dicts in--long+ Markdown/default renderers to avoidAttributeErrorwhen running:topmark processors --format markdown --long
- Treat
- Typing:
- Resolve a redefinition error caused by a misplaced annotation in types code.
📚 Docs
- README.md — Mention block (
/* … */) alongside line (#,//) comment styles; add CSS example. - docs/usage/filetypes.md — Expand processor table with modules and registered file types; document
CBlockHeaderProcessor.
🧹 Chore
- Add standard TopMark headers to files in
typings/. - Keep pre-commit/dev tooling in sync (see commit history for exact bumps).
⚙️ Compatibility
- No breaking changes. Existing configurations continue to work. New languages can opt-in to the block processor where applicable.
⬇️ Install / Upgrade
pip install -U topmark
# or
uv pip install --system -U topmarkIf you run into issues or have ideas for additional languages to support, please open an issue or PR. Happy marking! ✨
- Full Changelog: v0.7.0...v0.8.0