Download pixel_cursor/_internal.py from AlterProgramming/venture-studio: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/AlterProgramming/venture-studio/resolve/main/pixel_cursor/_internal.py
- Command line
-
hf download hf://spaces/AlterProgramming/venture-studio/pixel_cursor/_internal.py
-
curl -L -o _internal.py https://huggingface.co/spaces/AlterProgramming/venture-studio/resolve/main/pixel_cursor/_internal.py
604 Bytes
| """Internal mutation token. Only pixel_cursor.* should import this module.""" | |
| from __future__ import annotations | |
| class _Token: | |
| __slots__ = () | |
| def __repr__(self) -> str: | |
| return "<pixel_cursor mutation token>" | |
| _MUTATION_TOKEN = _Token() | |
| def _verify(token: object) -> None: | |
| if token is not _MUTATION_TOKEN: | |
| raise PermissionError( | |
| "Artifact construction requires the pixel_cursor mutation token. " | |
| "All Artifact creation and mutation must go through a PixelCursor " | |
| "(see pixel_cursor.open_cursor and cursor.write_* methods)." | |
| ) | |