Skip to content

WorkspaceBuilder: Harden typings #857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force

- Fix resolution of direcotries

- WorkspaceBuilder: Require `Server` in constructor (#857)

## tmuxp 1.23.0 (_yanked_, 2022-12-28)

_Yanked release: `tmuxp load` issues, see #856_
Expand Down
10 changes: 6 additions & 4 deletions src/tmuxp/cli/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ def set_layout_hook(session: Session, hook_name: str) -> None:
session.cmd(*cmd)


def load_plugins(sconf: t.Dict[str, t.Any]) -> t.List[t.Any]:
def load_plugins(session_config: t.Dict[str, t.Any]) -> t.List[t.Any]:
"""
Load and return plugins in workspace
"""
plugins = []
if "plugins" in sconf:
for plugin in sconf["plugins"]:
if "plugins" in session_config:
for plugin in session_config["plugins"]:
try:
module_name = plugin.split(".")
module_name = ".".join(module_name[:-1])
Expand Down Expand Up @@ -396,7 +396,9 @@ def load_workspace(

try: # load WorkspaceBuilder object for tmuxp workspace / tmux server
builder = WorkspaceBuilder(
sconf=expanded_workspace, plugins=load_plugins(expanded_workspace), server=t
session_config=expanded_workspace,
plugins=load_plugins(expanded_workspace),
server=t,
)
except exc.EmptyWorkspaceException:
tmuxp_echo("%s is empty or parsed no workspace data" % workspace_file)
Expand Down
Loading