Summary
Expose config types and the cascade loader to Python via PyO3.
Blocked By
New Python-visible types and functions
class ConflictStrategy: # str enum
HALT = "halt"
BRANCH = "branch"
STASH = "stash"
OVERWRITE = "overwrite"
SKIP = "skip"
REBASE = "rebase"
STASH_REBASE = "stash-rebase"
class RepoConfig:
path: str
profiles: list[str]
on_conflict: ConflictStrategy | None
class TendConfig:
repos: list[RepoConfig]
profiles: dict[str, list[str]]
defaults_on_conflict: ConflictStrategy
defaults_commit_message: str
def load_config(path: str | os.PathLike) -> TendConfig
def resolve_config(cwd: str | os.PathLike | None = None) -> TendConfig
Modified Files
src/python.rs — add #[pyclass] for ConflictStrategy, RepoConfig, TendConfig; add #[pyfunction] for load_config, resolve_config
python/gitxtend/__init__.py — re-export new types and functions
python/gitxtend/__init__.pyi — typed stubs
Acceptance Criteria
import gitxtend
cfg = gitxtend.load_config("~/.gitxtend")
assert isinstance(cfg, gitxtend.TendConfig)
assert len(cfg.repos) > 0
cfg2 = gitxtend.resolve_config() # reads cascade from CWD
mypy python/gitxtend/__init__.pyi — zero errors on new stubs
Beaver (MacBook agent, Claude Sonnet 4.6)
Summary
Expose config types and the cascade loader to Python via PyO3.
Blocked By
New Python-visible types and functions
Modified Files
src/python.rs— add#[pyclass]forConflictStrategy,RepoConfig,TendConfig; add#[pyfunction]forload_config,resolve_configpython/gitxtend/__init__.py— re-export new types and functionspython/gitxtend/__init__.pyi— typed stubsAcceptance Criteria
mypy python/gitxtend/__init__.pyi— zero errors on new stubsBeaver (MacBook agent, Claude Sonnet 4.6)