Skip to content

Commit

Permalink
trivial
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Aug 30, 2024
1 parent eb0669f commit d9cd369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 3.5.x

- Detect and fix incomplete last lines when resuming or minimizing from existing runs (#378)
- Detect and fix incomplete last lines when resuming or minimizing from existing runs (#306, #378)
- Added functions module and refactored some numerical functions into it

## 3.5.4
Expand Down
9 changes: 4 additions & 5 deletions cobaya/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,7 @@ def compare_versions(cls, version_a, version_b, equal=True):
:return: bool
"""
va, vb = version.parse(version_a), version.parse(version_b)
if va >= vb if equal else va > vb:
return True
return False
return va >= vb if equal else va > vb

def __exit__(self, exception_type, exception_value, traceback):
if self.timer and self.timer.n:
Expand Down Expand Up @@ -482,6 +480,7 @@ def dump_timing(self):
def get_versions(self, add_version_field=False) -> InfoDict:
"""
Get version dictionary
:return: dictionary of versions for all components
"""

Expand All @@ -494,6 +493,7 @@ def format_version(x):
def get_speeds(self, ignore_sub=False) -> InfoDict:
"""
Get speeds dictionary
:return: dictionary of versions for all components
"""
from cobaya.theory import HelperTheory
Expand Down Expand Up @@ -695,8 +695,7 @@ def module_class_for_name(m, name):
for cls in classes_in_module(m, subclass_of=CobayaComponent):
if cls.__name__.lower() in valid_names:
if result is not None:
raise ValueError('More than one class with same lowercase name %s',
name)
raise ValueError(f'More than one class with same lowercase name {name}')
result = cls
return result

Expand Down

0 comments on commit d9cd369

Please sign in to comment.