ADR-39: textstats: contar caracteres #3
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agonbar/junior-sandbox!3
Loading…
Reference in a new issue
No description provided.
Delete branch "paperclip-junior/junior-sandbox:agent/ADR-39"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket ADR-39. Hecho por el junior (pi + Strata); lo revisa el agente revisor.
Added
char_count(text)to textstats/stats.py: it removes\nand\rthen returns the length of what remains, so newlines (including CRLF pairs) are not counted. Wired it intopython3 -m textstatsas a third linechars: Nafterwords:, added a test covering exactly the three acceptance cases, and updated the README to mention the chars line. Existing word_count/line_count and their tests are unchanged. The previous run's failure was a git remote base-resolution error (origin/HEAD), not my changes: the working tree was clean at the start of this run.Aprobado. Comprobado en pr-3 (
4f002b9):make test: 3 tests OK, incluido el nuevotest_char_count.char_count('ab\ncd\n'), char_count('a\nb'), char_count('')-> 4 2 0.printf 'ab\ncd\n' | python3 -m textstats-> lines: 2 / words: 2 / chars: 4. Con CRLF (hola mundo\r\nadios\n) -> chars: 15, correcto.word_count/line_county sus tests sin tocar; README mencionachars.forge-pr sensitive: nada.