Skip to content

Commit 8d8dba6

Browse files
committed
refactor: validate_schema: windowdict -> window_dict
1 parent 4a487f9 commit 8d8dba6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/tmuxp/config.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def validate_schema(workspace_dict):
2626
-------
2727
bool
2828
"""
29-
3029
# verify session_name
3130
if "session_name" not in workspace_dict:
3231
raise exc.ConfigError('config requires "session_name"')
@@ -546,21 +545,21 @@ def import_teamocil(workspace_dict):
546545
tmuxp_config["windows"] = []
547546

548547
for w in workspace_dict["windows"]:
549-
windowdict = {"window_name": w["name"]}
548+
window_dict = {"window_name": w["name"]}
550549

551550
if "clear" in w:
552-
windowdict["clear"] = w["clear"]
551+
window_dict["clear"] = w["clear"]
553552

554553
if "filters" in w:
555554
if "before" in w["filters"]:
556555
for b in w["filters"]["before"]:
557-
windowdict["shell_command_before"] = w["filters"]["before"]
556+
window_dict["shell_command_before"] = w["filters"]["before"]
558557
if "after" in w["filters"]:
559558
for b in w["filters"]["after"]:
560-
windowdict["shell_command_after"] = w["filters"]["after"]
559+
window_dict["shell_command_after"] = w["filters"]["after"]
561560

562561
if "root" in w:
563-
windowdict["start_directory"] = w.pop("root")
562+
window_dict["start_directory"] = w.pop("root")
564563

565564
if "splits" in w:
566565
w["panes"] = w.pop("splits")
@@ -572,10 +571,10 @@ def import_teamocil(workspace_dict):
572571
if "width" in p:
573572
# todo support for height/width
574573
p.pop("width")
575-
windowdict["panes"] = w["panes"]
574+
window_dict["panes"] = w["panes"]
576575

577576
if "layout" in w:
578-
windowdict["layout"] = w["layout"]
579-
tmuxp_config["windows"].append(windowdict)
577+
window_dict["layout"] = w["layout"]
578+
tmuxp_config["windows"].append(window_dict)
580579

581580
return tmuxp_config

0 commit comments

Comments
 (0)