Skip to content

Commit

Permalink
Partially reverted suggestions from code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
joernweissenborn committed Jan 20, 2022
1 parent 1293547 commit 05c1b5b
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions glotaran/project/generators/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def _generate_decay_model(
*, nr_compartments: int, irf: bool, spectral: bool, decay_type: str
nr_compartments: int, irf: bool, spectral: bool, decay_type: str
) -> dict:
"""Generate a decay model dictionary.
Expand Down Expand Up @@ -67,7 +67,7 @@ def _generate_decay_model(
return model


def generate_parallel_decay_model(*, nr_compartments: int = 1, irf: bool = False) -> dict:
def generate_parallel_decay_model(nr_compartments: int = 1, irf: bool = False) -> dict:
"""Generate a parallel decay model dictionary.
Parameters
Expand All @@ -85,7 +85,7 @@ def generate_parallel_decay_model(*, nr_compartments: int = 1, irf: bool = False
return _generate_decay_model(nr_compartments, irf, False, "parallel")


def generate_parallel_spectral_decay_model(*, nr_compartments: int = 1, irf: bool = False) -> dict:
def generate_parallel_spectral_decay_model(nr_compartments: int = 1, irf: bool = False) -> dict:
"""Generate a parallel spectral decay model dictionary.
Parameters
Expand All @@ -103,7 +103,7 @@ def generate_parallel_spectral_decay_model(*, nr_compartments: int = 1, irf: boo
return _generate_decay_model(nr_compartments, irf, True, "parallel")


def generate_sequential_decay_model(*, nr_compartments: int = 1, irf: bool = False) -> dict:
def generate_sequential_decay_model(nr_compartments: int = 1, irf: bool = False) -> dict:
"""Generate a sequential decay model dictionary.
Parameters
Expand All @@ -121,9 +121,7 @@ def generate_sequential_decay_model(*, nr_compartments: int = 1, irf: bool = Fal
return _generate_decay_model(nr_compartments, irf, False, "sequential")


def generate_sequential_spectral_decay_model(
*, nr_compartments: int = 1, irf: bool = False
) -> dict:
def generate_sequential_spectral_decay_model(nr_compartments: int = 1, irf: bool = False) -> dict:
"""Generate a sequential spectral decay model dictionary.
Parameters
Expand Down Expand Up @@ -154,17 +152,17 @@ def generate_sequential_spectral_decay_model(
def generate_model(generator_name: str, **generator_arguments: dict) -> Model:
"""Generate a model.
Parameters
----------
generator_name : str
The generator to use.
generator_arguments : dict
Arguments for the generator.
Parameters
----------
generator_name : str
The generator to use.
generator_arguments : dict
Arguments for the generator.
Returns
-------
Model
The generated model
Returns
-------
Model
The generated model
See Also
--------
Expand All @@ -173,10 +171,10 @@ def generate_model(generator_name: str, **generator_arguments: dict) -> Model:
generate_sequential_decay_model
generate_sequential_spectral_decay_model
Raises
------
ValueError
Raised when an unknown generator is specified.
Raises
------
ValueError
Raised when an unknown generator is specified.
"""
if generator_name not in generators:
raise ValueError(
Expand All @@ -190,17 +188,17 @@ def generate_model(generator_name: str, **generator_arguments: dict) -> Model:
def generate_model_yml(generator_name: str, **generator_arguments: dict) -> str:
"""Generate a model as yml string.
Parameters
----------
generator_name : str
The generator to use.
generator_arguments : dict
Arguments for the generator.
Parameters
----------
generator_name : str
The generator to use.
generator_arguments : dict
Arguments for the generator.
Returns
-------
str
The generated model yml string.
Returns
-------
str
The generated model yml string.
See Also
--------
Expand All @@ -209,10 +207,10 @@ def generate_model_yml(generator_name: str, **generator_arguments: dict) -> str:
generate_sequential_decay_model
generate_sequential_spectral_decay_model
Raises
------
ValueError
Raised when an unknown generator is specified.
Raises
------
ValueError
Raised when an unknown generator is specified.
"""
if generator_name not in generators:
raise ValueError(
Expand Down

0 comments on commit 05c1b5b

Please sign in to comment.