__init__.py
python
sha256:2eaa5d95f9d9383498e76947410a26e5a3ba23d182f339910c424cf88fad412b
fix: try fetch/presign before fetch/mpack to avoid Cloudfla…
Sonnet 4.6
patch
7 days ago
| 1 | """Muse — domain-agnostic version control for multidimensional state.""" |
| 2 | |
| 3 | import pathlib as _pathlib |
| 4 | import re as _re |
| 5 | |
| 6 | def _read_version() -> str: |
| 7 | # Editable install: pyproject.toml lives two levels up from this file. |
| 8 | # Reading it directly means bumping pyproject.toml is instantly reflected |
| 9 | # without reinstalling. Packaged installs have no pyproject.toml alongside |
| 10 | # the source, so they fall through to importlib.metadata. |
| 11 | _toml = _pathlib.Path(__file__).parent.parent / "pyproject.toml" |
| 12 | if _toml.is_file(): |
| 13 | _m = _re.search(r'^version\s*=\s*"([^"]+)"', _toml.read_text(), _re.MULTILINE) |
| 14 | if _m: |
| 15 | return _m.group(1) |
| 16 | from importlib.metadata import PackageNotFoundError, version as _meta_version |
| 17 | try: |
| 18 | return _meta_version("muse") |
| 19 | except PackageNotFoundError: |
| 20 | return "0.0.0+dev" |
| 21 | |
| 22 | __version__: str = _read_version() |
File History
1 commit
sha256:2eaa5d95f9d9383498e76947410a26e5a3ba23d182f339910c424cf88fad412b
fix: try fetch/presign before fetch/mpack to avoid Cloudfla…
Sonnet 4.6
patch
7 days ago