Skip to content

Commit

Permalink
rebase tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
datamel committed Jun 29, 2021
1 parent 1824079 commit cfffcd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cylc/flow/pathutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from pathlib import Path
import re
from shutil import rmtree
from typing import Dict, Iterable, Set, Union, Optional, OrderedDict, Any
from typing import Dict, Iterable, Set, Union, Optional, Any

from cylc.flow import LOG
from cylc.flow.cfgspec.glbl_cfg import glbl_cfg
Expand Down Expand Up @@ -131,7 +131,7 @@ def make_workflow_run_tree(workflow):

def make_localhost_symlinks(
rund: Union[Path, str],
named_sub_dir: str,
named_sub_dir: str,
symlink_conf: Optional[Dict[str, Dict[str, str]]] = None
) -> Dict[str, Union[Path, str]]:
"""Creates symlinks for any configured symlink dirs from glbl_cfg.
Expand Down Expand Up @@ -190,7 +190,7 @@ def get_dirs_to_symlink(
dirs_to_symlink: [directory: symlink_path]
"""
dirs_to_symlink: Dict[str, Any] = {}
if not symlink_conf:
if symlink_conf is None:
symlink_conf = glbl_cfg().get(['install', 'symlink dirs'])
if install_target not in symlink_conf.keys():
return dirs_to_symlink
Expand All @@ -199,7 +199,7 @@ def get_dirs_to_symlink(
dirs_to_symlink['run'] = os.path.join(base_dir, 'cylc-run', flow_name)
for dir_ in ['log', 'share', 'share/cycle', 'work']:
link = symlink_conf[install_target].get(dir_, None)
if (not link) is None or link == base_dir:
if (not link) or link == base_dir:
continue
dirs_to_symlink[dir_] = os.path.join(link, 'cylc-run', flow_name, dir_)
return dirs_to_symlink
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/workflow_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
PlatformLookupError,
ServiceFileError,
TaskRemoteMgmtError,
WorkflowFilesError,
handle_rmtree_err,
UserInputError,
WorkflowFilesError)
WorkflowFilesError
)
from cylc.flow.pathutil import (
expand_path,
get_workflow_run_dir,
Expand Down

0 comments on commit cfffcd1

Please sign in to comment.