From 0bdfb253efed09172f7561bb642c9606fbc4b779 Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Wed, 26 Nov 2025 10:54:17 -0600 Subject: [PATCH] wip: feat: workspace tmux remove --- pyproject.toml | 8 ++++---- workspaces.py | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e453d48..226e898 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,16 +81,16 @@ select = [ # "INT", # flake8-gettext # "ARG", # flake8-unused-arguments "PTH", # flake8-use-pathlib -# "ERA", # eradicate + "ERA", # eradicate "PD", # pandas-vet "PGH", # pygrep-hooks # "PL", # Pylint -# "PLC", # Convention + "PLC", # Convention "PLE", # Error # "PLR", # Refactor "PLW", # Warning -# "TRY", # tryceratops + "TRY", # tryceratops "NPY", # NumPy-specific rules -# "RUF", # Ruff-specific rules + "RUF", # Ruff-specific rules ] diff --git a/workspaces.py b/workspaces.py index 33dcdeb..e948a82 100755 --- a/workspaces.py +++ b/workspaces.py @@ -158,7 +158,8 @@ def get_git_status(repo_path: Path) -> GitStatus: for line in out.splitlines(): if line.startswith("# branch.ab"): - # Example: "# branch.ab +1 -2" + # Example: + # branch.ab +1 -2 m = re.search(r"\+(\d+)\s+-(\d+)", line) if m: ahead = int(m.group(1)) @@ -920,7 +921,6 @@ def git_status_porcelain(repo_path: Path) -> List[Tuple[str, str]]: for line in out.splitlines(): if not line.strip(): continue - # Format: 'XY path' status = line[:2] path = line[3:] changes.append((status, path)) @@ -1047,7 +1047,6 @@ def commit_workspace( f"[red]Workspace '{ws_dir.name}' does not exist at {ws_dir}[/red]" ) raise typer.Exit(1) - title, _desc = read_workspace_readme(ws_dir) worktrees: List[Path] = [] for child in sorted(p for p in ws_dir.iterdir() if p.is_dir()): @@ -1199,8 +1198,6 @@ def status_workspace( title, desc = read_workspace_readme(ws_dir) - # if desc: - # console.print(Panel(desc, title=title)) table = Table( title=f"Status for workspace:'{title}'\n(dir: {ws_dir.name})\n\n{desc}", @@ -1549,7 +1546,6 @@ def tmux_cli_attach( """ Attach or create a session for a repo in a workspace. """ - # ws_dir = get_workspace_dir(workspace) _settings, _repos_dir, workspaces_dir = get_ctx_paths(ctx) ws_dir = find_workspace_dir(workspaces_dir, workspace) if not ws_dir: @@ -1638,8 +1634,6 @@ def tmux_cli_remove( for session_name in tmux_sessions: remove_session(session_name) - # - # remove_session_if_exists(session_name) app.add_typer(tmux_app)