Commit 8c690e9
Type annotations: seq.py, collections.py; bugfixes and cleanups
seq.py: all 15 public items annotated — begin/begin0, lazy variants,
pipe1 (Callable[[Any], Any] bodies), pipe/pipec, piped1/piped/
lazy_piped1/lazy_piped (__or__ takes Callable | sym for exitpipe
sentinel), assign, do/do0 + maybe_call closure.
collections.py: comprehensive pass — box, ThreadLocalBox, Some, Shim,
frozendict (all methods, keys typed as Hashable), roview, view,
ShadowedSequence (constructors with attribute types, all methods and
closures), _SequenceReprEqMixin (renamed from _StrReprEqMixin),
mogrify + doit closure, get_abcs, in_slice, index_in_slice, and
private helpers (_index_in_slice, _make_negidx_converter with closures,
_canonize_slice).
Bugfixes:
- _SequenceReprEqMixin.__eq__: now requires Sequence, raises TypeError
for incompatible types (was silently crashing on non-Sized input).
- roview.__init__: _cache attribute now declared (was created lazily
by _update_cache, undocumented).
- _make_negidx_converter.convert: explicit return None for k is None
passthrough path.
Also: D14 added to TODO_DEFERRED.md (flexible view variant from ancient
git history).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b1e47f1 commit 8c690e9
3 files changed
Lines changed: 98 additions & 83 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
0 commit comments