Skip to content

Commit

Permalink
entry_points: remove unused results return value
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Nov 1, 2023
1 parent d1ff77d commit 0f376d1
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions cylc/rose/entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"""Top level module providing entry point functions."""

from pathlib import Path
from typing import Union

from cylc.rose.utilities import (
copy_config_file,
Expand Down Expand Up @@ -52,7 +51,7 @@ def pre_configure(srcdir=None, opts=None, rundir=None) -> dict:
return plugin_result


def post_install(srcdir=None, opts=None, rundir=None) -> Union[dict, bool]:
def post_install(srcdir=None, opts=None, rundir=None) -> bool:
"""Run after Cylc file installation has completed."""
from cylc.rose.fileinstall import rose_fileinstall

Expand All @@ -66,17 +65,20 @@ def post_install(srcdir=None, opts=None, rundir=None) -> Union[dict, bool]:
srcdir: Path = Path(srcdir)
rundir: Path = Path(rundir)

results = {}
# transfer the rose-suite.conf file
copy_config_file(srcdir=srcdir, rundir=rundir)
results['record_install'] = record_cylc_install_options(

# write cylc-install CLI options to an optional config
record_cylc_install_options(
srcdir=srcdir, opts=opts, rundir=rundir
)
results['fileinstall'] = rose_fileinstall(rundir, opts)
# Finally dump a log of the rose-conf in its final state.
if results['fileinstall']:
dump_rose_log(rundir=rundir, node=results['fileinstall'])

return results
# perform file installation
config_node = rose_fileinstall(rundir, opts)
if config_node:
dump_rose_log(rundir=rundir, node=config_node)

return True


def rose_stem():
Expand Down

0 comments on commit 0f376d1

Please sign in to comment.