Skip to content

Commit 5a64fad

Browse files
committed
♻️ Guard license_notice
1 parent b9a741a commit 5a64fad

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CPAC/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ def _docs_prefix() -> str:
3535
return DOCS_URL_PREFIX
3636

3737

38-
license_notice = f"""Copyright (C) 2022-2024 C-PAC Developers.
38+
def license_notice() -> str:
39+
"""Get the license notice for this version."""
40+
return f"""Copyright (C) 2022-2024 C-PAC Developers.
3941
4042
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
4143
and you are welcome to redistribute it under certain conditions. For
4244
details, see {_docs_prefix()}/license or the COPYING and
4345
COPYING.LESSER files included in the source code."""
46+
47+
4448
__all__ = ["license_notice", "version", "__version__"]

CPAC/pipeline/cpac_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def run_workflow(
414414
)
415415
if c.pipeline_setup["system_config"]["random_seed"] is not None
416416
else "",
417-
license_notice=CPAC.license_notice.replace("\n", "\n "),
417+
license_notice=CPAC.license_notice().replace("\n", "\n "),
418418
),
419419
)
420420
subject_info = {}

0 commit comments

Comments
 (0)