diff --git a/pyproject.toml b/pyproject.toml index 226e898..562fefa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ select = [ "TID", # flake8-tidy-imports "TCH", # flake8-type-checking # "INT", # flake8-gettext -# "ARG", # flake8-unused-arguments + "ARG", # flake8-unused-arguments "PTH", # flake8-use-pathlib "ERA", # eradicate "PD", # pandas-vet diff --git a/workspaces.py b/workspaces.py index e948a82..90072d5 100755 --- a/workspaces.py +++ b/workspaces.py @@ -676,7 +676,7 @@ def find_repo_for_worktree(worktree_path: Path, repos_dir: Path) -> Optional[Pat return None -def has_unpushed_commits(repo_path: Path, branch: str) -> bool: +def has_unpushed_commits(repo_path: Path) -> bool: """ Detect if branch has commits not on its upstream. Uses 'git rev-list @{u}..HEAD'; if non-empty, there are unpushed commits. @@ -839,7 +839,7 @@ def remove_workspace( # Only care about "unpushed commits" if the branch is NOT integrated into main. if repo is not None and branch != "?" and not integrated: - if has_unpushed_commits(wt, branch): + if has_unpushed_commits(wt): problems.append(f"{wt.name}: unpushed commits on '{branch}'") if problems and not force: console.print( @@ -1563,7 +1563,6 @@ def tmux_cli_attach( @tmux_app.command("list-sessions") def tmux_cli_list_sessions( - ctx: typer.Context, workspace: Optional[str] = typer.Option( None, "--workspace", @@ -1591,7 +1590,6 @@ def tmux_cli_list_sessions( @tmux_app.command("remove") def tmux_cli_remove( - ctx: typer.Context, workspace: Optional[str] = typer.Option( None, "--workspace",