Skip to content

Thousands separator for byte counts in human_size() (+ first test) #20

Description

@Vortrix5

Summary

human_size() formats most sizes with a thousands separator (1,023.5 MB), but the bytes branch doesn't: 5000 shows as 5000 B instead of 5,000 B. Small consistency fix, and human_size has no test yet, so this is a nice spot to add the first one.

Where

src/sifty/console.py, the human_size() function. The B case uses f"{int(value)} B".

Acceptance criteria

  • Byte counts use a thousands separator (e.g. 5,000 B)
  • A test covering a few sizes across units (B / KB / MB)
  • pytest green

Tip

f"{int(value):,} B" does the formatting. Add the test to tests/ (a new test_console.py is fine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerstestsTest suite

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions