Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Sep 17, 2021
1 parent 9d61605 commit 2efd7bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions glotaran/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ def _add_dataset_type(self):
self._add_model_item("dataset", dataset_model_type)

def as_dict(self) -> dict:
model_dict = {}
model_dict["default-megacomplex"] = self.default_megacomplex

model_dict = {'default-megacomplex': self.default_megacomplex}
for name in self._model_items:
items = getattr(self, name)
if len(items) == 0:
Expand Down
3 changes: 1 addition & 2 deletions glotaran/project/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def get_scheme(self) -> Scheme:
if "weight" in dataset:
data[label]["weight"] = dataset.weight

new_scheme = replace(self.scheme, parameters=self.optimized_parameters)
return new_scheme
return replace(self.scheme, parameters=self.optimized_parameters)

def markdown(self, with_model: bool = True, base_heading_level: int = 1) -> MarkdownStr:
"""Format the model as a markdown text.
Expand Down

0 comments on commit 2efd7bd

Please sign in to comment.