You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
5
5
6
6
## Project Overview
7
7
8
-
**bitmath** is a pure-Python library (no external runtime dependencies) for representing and converting file sizes across SI (decimal) and NIST (binary) unit systems. It supports arithmetic, rich comparisons, bitwise ops, parsing, formatting, and f-string/format() support.
8
+
**bitmath** is a pure-Python library (no external runtime dependencies) for representing and converting file sizes across SI (decimal) and NIST (binary) unit systems. It supports arithmetic (including floor division, modulo, and `divmod` for capacity math), rich comparisons, bitwise ops, parsing, formatting, and f-string/format() support.
9
9
10
10
## Project Direction
11
11
bitmath has been around for almost 12 years, and over that lifetime it promised to deliver backwards compatibility. It delivered on that promise and gathered a strong supporting of people and eventual "critical infrastructure" project status on the PyPI.org website.
@@ -20,7 +20,7 @@ Phases 1 (maintenance 1.4.0) and 2 (bitmath 2.0.0) are complete. The project:
20
20
21
21
- Supports **Python 3.9 and newer only** (`requires-python = ">=3.9"` in `pyproject.toml`)
22
22
- Uses `hatchling` as the build backend (replaces `setup.py`)
23
-
- Uses `pytest` as the test runner (292 tests, 99% coverage — one branch in `system` property intentionally uncovered)
23
+
- Uses `pytest` as the test runner (303 tests). Coverage is high but platform-sensitive: the `query_device_capacity` branches for the *other* OS are naturally uncovered on any single run.
24
24
- Is published on PyPI as version 2.0.0
25
25
- Drop-in compatible with the 1.x public API
26
26
@@ -71,5 +71,5 @@ All unit values are normalized to bits internally; conversion between units happ
71
71
- Test runner: `pytest`
72
72
- All tests are in `tests/` as `test_*.py` files
73
73
- Test case names must be unique across the suite — enforced by `tests/test_unique_testcase_names.sh`
74
-
- Coverage: 99% (one branch in `system` property intentionally uncovered)
74
+
- Coverage is platform-sensitive: Windows and POSIX `query_device_capacity` paths only run on their respective OS
75
75
-`unittest.mock` (stdlib) is used for patching in integration tests
0 commit comments