File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1- import os
1+ import pathlib
22
33before_workspace = {
44 "session_name" : "sample workspace" ,
3333def after_workspace ():
3434 return {
3535 "session_name" : "sample workspace" ,
36- "start_directory" : os . path . expanduser ( "~" ),
36+ "start_directory" : str ( pathlib . Path (). home () ),
3737 "windows" : [
3838 {
3939 "window_name" : "editor" ,
@@ -57,21 +57,15 @@ def after_workspace():
5757 ],
5858 },
5959 {
60- "start_directory" : os .path .normpath (
61- os .path .join (os .path .expanduser ("~" ), "./" )
62- ),
60+ "start_directory" : str (pathlib .Path ().home ()),
6361 "panes" : [{"shell_command" : [{"cmd" : "pwd" }]}],
6462 },
6563 {
66- "start_directory" : os .path .normpath (
67- os .path .join (os .path .expanduser ("~" ), "./asdf" )
68- ),
64+ "start_directory" : str (pathlib .Path ().home () / "asdf" ),
6965 "panes" : [{"shell_command" : [{"cmd" : "pwd" }]}],
7066 },
7167 {
72- "start_directory" : os .path .normpath (
73- os .path .join (os .path .expanduser ("~" ), "../" )
74- ),
68+ "start_directory" : str (pathlib .Path ().home ().parent .resolve ()),
7569 "panes" : [{"shell_command" : [{"cmd" : "pwd" }]}],
7670 },
7771 {"panes" : [{"shell_command" : [{"cmd" : "top" }]}]},
Original file line number Diff line number Diff line change 1- import os
1+ import pathlib
22
33from .. import utils as test_utils
44
@@ -9,5 +9,5 @@ def unexpanded_yaml():
99
1010def expanded_yaml ():
1111 return test_utils .read_workspace_file ("workspace/expand2-expanded.yaml" ).format (
12- HOME = os . path . expanduser ( "~" )
12+ HOME = str ( pathlib . Path (). home () )
1313 )
You can’t perform that action at this time.
0 commit comments