Commit 70a5e76
Export chebyshev_distance from algorithms.math and polish module
- Register chebyshev_distance in algorithms/math/__init__.py (import
+ __all__) so `from algorithms.math import chebyshev_distance`
resolves to the function, not the submodule. Without this, the
test in test_math.py fails with TypeError ('module' is not callable).
- Align the module style with manhattan_distance.py: module docstring,
`from __future__ import annotations`, type hints, doctest examples,
and the project's ValueError raising convention.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ffc6979 commit 70a5e76
2 files changed
Lines changed: 24 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | | - | |
6 | | - | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 14 | + | |
11 | 15 | | |
12 | | - | |
13 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments