Skip to content

Commit

Permalink
🧹👌 Fixed up left over tying issues in parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand committed Nov 21, 2021
1 parent 5172afa commit 053e356
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions glotaran/parameter/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ def from_list_or_value(
return param

@classmethod
def from_dict(cls, parameter_dict: dict[str, Parameter]) -> Parameter:
def from_dict(cls, parameter_dict: dict[str, Any]) -> Parameter:
"""Create a :class:`Parameter` from a dictionary.
Expects a dictionary created by :method:`Parameter.as_dict`.
Parameters
----------
parameter_dict : dict
parameter_dict : dict[str, Any]
The source dictionary.
Returns
Expand All @@ -169,7 +169,7 @@ def from_dict(cls, parameter_dict: dict[str, Parameter]) -> Parameter:
parameter_dict["label"] = parameter_dict["label"].split(".")[-1]
return cls(**parameter_dict)

def as_dict(self, as_optimized: bool = True) -> dict:
def as_dict(self, as_optimized: bool = True) -> dict[str, Any]:
"""Create a dictionary containing the parameter properties.
Intended for internal use.
Expand All @@ -181,7 +181,7 @@ def as_dict(self, as_optimized: bool = True) -> dict:
Returns
-------
dict
dict[str, Any]
The created dictionary.
"""
parameter_dict = {
Expand Down Expand Up @@ -218,12 +218,12 @@ def set_from_group(self, group: ParameterGroup):
self.value = p.value
self.vary = p.vary

def _set_options_from_dict(self, options: dict):
def _set_options_from_dict(self, options: dict[str, Any]):
"""Set the parameter's options from a dictionary.
Parameters
----------
options : dict
options : dict[str, Any]
A dictionary containing parameter options.
"""
if Keys.EXPR in options:
Expand Down

0 comments on commit 053e356

Please sign in to comment.