Skip to content

Commit 6a1a970

Browse files
tgilondaniel-rdt
andauthored
Apply suggestions from code review
Co-authored-by: Daniel Rüdt <117752024+daniel-rdt@users.noreply.github.com>
1 parent 0e08936 commit 6a1a970

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

doc/release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
* Use `combine_indicators` instead of `collect_indicators` in the function `summary_benchmark_indicators` ([#797](https://github.com/open-energy-transition/open-tyndp/pull/797)).
8282

83-
* Refactor `clean_projects` script to reduce the redundancy in its outputs ([#804](https://github.com/open-energy-transition/open-tyndp/issues/804)).
83+
* Refactor `clean_projects` script to reduce the redundancy in its outputs ([#807](https://github.com/open-energy-transition/open-tyndp/issues/807)).
8484

8585

8686
## Upcoming PyPSA-Eur Release

scripts/cba/clean_projects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def build_method_assignments(
419419
Returns
420420
-------
421421
pd.DataFrame
422-
List of the method to apply on projects.
422+
DataFrame of projects with the corresponding method to apply.
423423
"""
424424
guidelines = guidelines.rename(
425425
columns={

scripts/cba/prepare_project.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222

2323
def check_method(method: str) -> str:
2424
"""
25-
Normalize and validate the CBA method name.
25+
Normalize and validate a given CBA method name.
2626
27-
If the method is not recognized as either "pint" or "toot", a ValueError is raised.
27+
Raises
28+
------
29+
ValueError
30+
If the normalized value is neither "pint" nor "toot".
2831
"""
2932
method = method.lower().strip()
3033
if method not in ["pint", "toot"]:

0 commit comments

Comments
 (0)