Typings - vcspull.types¶
Typings for vcspull.
Configuration Object Graph¶
The user-facing .vcspull.yaml maps workspace roots (parent directories)
to named repositories. For example:
~/study/c:
cpython:
repo: git+https://github.com/python/cpython.git
tmux:
repo: git+https://github.com/tmux/tmux.git
~/work/js:
react:
repo: https://github.com/facebook/react.git
vite:
repo: https://github.com/vitejs/vite.git
In Python we model this as:
WorkspaceRoot - Mapping of repository name to its configuration
WorkspaceRoots - Mapping of workspace root path to WorkspaceRoot
When the configuration is parsed we preserve the original key string, but
WorkspaceRoot terminology is used consistently across the codebase.
- class vcspull.types.WorktreeConfigDict[source]¶
Bases:
TypedDictConfiguration for a single git worktree.
Worktrees allow checking out multiple branches/tags/commits of a repository simultaneously in separate directories.
Exactly one of
tag,branch, orcommitmust be specified.Examples
Tag worktree (immutable, detached HEAD):
{"dir": "../myproject-v1.0", "tag": "v1.0.0"}
Branch worktree (updatable):
{"dir": "../myproject-dev", "branch": "develop"}
Commit worktree (immutable, detached HEAD):
{"dir": "../myproject-abc", "commit": "abc123"}
- class vcspull.types.RepoPinDict[source]¶
Bases:
TypedDictPer-operation pin flags for a repository entry.
Unspecified keys default to
False(not pinned).Note: Distinct from
WorktreeConfigDict.lockwhich prevents git worktree removal at the filesystem level.RepoPinDictcontrols vcspull config mutation policy only.Examples
Pin only import:
options: pin: import: true
Pin import and fmt:
options: pin: import: true fmt: true
- class vcspull.types.RepoOptionsDict[source]¶
Bases:
TypedDictMutation policy stored under the
options:key in a repo entry.Note:
pinhere controls vcspull config mutation. It is distinct fromWorktreeConfigDict.lockwhich prevents git worktree removal.Examples
Pin all operations:
options: pin: true pin_reason: "pinned to upstream"
Pin only import (prevent
--syncfrom replacing URL):options: pin: import: true
Shorthand form — equivalent to
pin: {import: true}:options: allow_overwrite: false
-
pin:
bool|RepoPinDict¶ Truepins all ops; a mapping pins specific ops only.Unspecified keys in the mapping default to
False(not pinned).
-
pin:
- class vcspull.types.RepoEntryDict[source]¶
Bases:
TypedDictRaw per-repository entry as written to .vcspull.yaml.
Examples
Minimal entry:
repo: git+git@github.com:user/myrepo.git
With pin options:
repo: git+git@github.com:user/myrepo.git options: pin: import: true pin_reason: "pinned to company fork"
-
options:
NotRequired[RepoOptionsDict]¶ Mutation policy. Nested under
options:to avoid polluting VCS fields.
-
options:
- class vcspull.types.RawConfigDict[source]¶
Bases:
TypedDictConfiguration dictionary without any type marshalling or variable resolution.
- vcs: VCSLiteral¶
- name: str¶
- path: StrPath¶
- url: str¶
- remotes: GitSyncRemoteDict¶
- class vcspull.types.ConfigDict[source]¶
Bases:
TypedDictConfiguration map for vcspull after shorthands and variables resolved.
- vcs: VCSLiteral | None¶
- name: str¶
- path: pathlib.Path¶
- url: str¶
- workspace_root: str¶
- remotes: NotRequired[GitSyncRemoteDict | None]¶
- shell_command_after: NotRequired[list[str] | None]¶
- worktrees: NotRequired[list[WorktreeConfigDict] | None]¶
- options: NotRequired[RepoOptionsDict]¶