_cut in taskuary/lookups.py trims every look-up's text before the Assistant reads it. It is pure, used everywhere, and has no test of its own.
Done when a new CutTests class in tests/test_lookups.py pins its behaviour:
- below 600 characters, whitespace and newlines collapse to single spaces;
- at 600 or more, the text keeps its own lines;
- a string exactly
n long is not cut;
- a longer one ends with
[…];
None gives ''.
No code change expected - if a test shows the function doing something surprising, say so in the PR.
Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.
_cutintaskuary/lookups.pytrims every look-up's text before the Assistant reads it. It is pure, used everywhere, and has no test of its own.Done when a new
CutTestsclass intests/test_lookups.pypins its behaviour:nlong is not cut;[…];Nonegives''.No code change expected - if a test shows the function doing something surprising, say so in the PR.
Getting started:
pip install -e ".[dev]", thenpython -m pytest -q(offline, a few seconds). UI work:cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.