cultcache-py: an extension is reported as an extension (a namedtuple was read as an array); boundary tests for the leaves
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8ebe43fe7a
commit
ed30592ea7
2 changed files with 67 additions and 3 deletions
|
|
@ -82,11 +82,11 @@ def _kind(raw: Any) -> str:
|
|||
return "string"
|
||||
if isinstance(raw, _BYTE_LIKE):
|
||||
return "bytes"
|
||||
if isinstance(raw, _ExtType): # a namedtuple, so before the arrays
|
||||
return "ext"
|
||||
if isinstance(raw, (_list, tuple)):
|
||||
return "array"
|
||||
if isinstance(raw, Mapping):
|
||||
return "map"
|
||||
return "ext" if isinstance(raw, _ExtType) else "other"
|
||||
return "map" if isinstance(raw, Mapping) else "other"
|
||||
|
||||
|
||||
def _refuse(what: str, found: str) -> NoReturn:
|
||||
|
|
|
|||
Loading…
Reference in a new issue