Add jsontypes: the type aliases the package's annotations share
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8cL4zN4XpaQF5cBtASzfq
This commit is contained in:
1 file changed
+16
@@ -0,0 +1,16 @@
|
|||||||
|
"""Type aliases shared by the package's modules.
|
||||||
|
|
||||||
|
The formats are JSON, and the oracle reads a record as the plain `dict` the standard
|
||||||
|
library's `json` module returns, so these aliases name what such a value is used as
|
||||||
|
rather than describing every key.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
# One parsed JSON object: a node, a receipt, a correction, a manifest.
|
||||||
|
type Record = dict[str, Any]
|
||||||
|
|
||||||
|
# A path given as text or as a path object; functions that take one return text unless
|
||||||
|
# their docstring says otherwise.
|
||||||
|
type StrPath = str | os.PathLike[str]
|
||||||
Reference in new issue
Block a user