aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/PLRsearch/Integrator.py4
-rw-r--r--resources/libraries/python/PLRsearch/PLRsearch.py6
-rw-r--r--resources/libraries/python/PLRsearch/stat_trackers.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/resources/libraries/python/PLRsearch/Integrator.py b/resources/libraries/python/PLRsearch/Integrator.py
index f80110ce29..cc8f838fe6 100644
--- a/resources/libraries/python/PLRsearch/Integrator.py
+++ b/resources/libraries/python/PLRsearch/Integrator.py
@@ -189,8 +189,8 @@ def estimate_nd(communication_pipe, scale_coeff=8.0, trace_enabled=False):
:raises numpy.linalg.LinAlgError: If the focus shape gets singular
(due to rounding errors). Try changing scale_coeff.
"""
- debug_list = list()
- trace_list = list()
+ debug_list = []
+ trace_list = []
# Block until input object appears.
(
dimension,
diff --git a/resources/libraries/python/PLRsearch/PLRsearch.py b/resources/libraries/python/PLRsearch/PLRsearch.py
index e0eea233ba..8d6e1ffe71 100644
--- a/resources/libraries/python/PLRsearch/PLRsearch.py
+++ b/resources/libraries/python/PLRsearch/PLRsearch.py
@@ -182,7 +182,7 @@ class PLRsearch:
f"Started search with min_rate {min_rate!r}, "
f"max_rate {max_rate!r}"
)
- trial_result_list = list()
+ trial_result_list = []
trial_number = self.trial_number_offset
focus_trackers = (None, None)
transmit_rate = (min_rate + max_rate) / 2.0
@@ -694,11 +694,11 @@ class PLRsearch:
trace_list,
sampls,
) = result_or_traceback
- except ValueError:
+ except ValueError as exc:
raise RuntimeError(
f"Worker {name} failed with the following traceback:\n"
f"{result_or_traceback}"
- )
+ ) from exc
logging.info(f"Logs from worker {name!r}:")
for message in debug_list:
logging.info(message)
diff --git a/resources/libraries/python/PLRsearch/stat_trackers.py b/resources/libraries/python/PLRsearch/stat_trackers.py
index d19eebedb7..e598fd840e 100644
--- a/resources/libraries/python/PLRsearch/stat_trackers.py
+++ b/resources/libraries/python/PLRsearch/stat_trackers.py
@@ -209,7 +209,7 @@ class ScalarDualStatTracker(ScalarStatTracker):
"""
# Using super() as copy() and add() are not expected to change
# signature, so this way diamond inheritance will be supported.
- primary = super(ScalarDualStatTracker, self)
+ primary = super()
if self.max_log_weight is None or log_weight >= self.max_log_weight:
self.max_log_weight = log_weight
self.secondary = primary.copy()