Skip to content

Commit 3f680c0

Browse files
author
Sarah Wagner
committed
(★‿★) more pythonic naming convention
1 parent 3fe9206 commit 3f680c0

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/lightcurves/LC.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def plot_lc(
508508
axtop.set_xbound(ax.get_xbound())
509509
axtop.set_xlim(ax.get_xlim())
510510
format_labels = astropy.time.Time(
511-
list(t for t in ax.get_xticks()), format=self.time_format
511+
list(ax.get_xticks()), format=self.time_format
512512
)
513513
if new_time_format == "isot":
514514
new_labels = [
@@ -784,9 +784,8 @@ def get_bblocks_above(
784784
self.block_val > threshold, self.block_val, threshold
785785
)
786786
except AttributeError:
787-
raise AttributeError(
788-
"Initialize Bayesian blocks with lc.get_bblocks() first!"
789-
)
787+
msg = "Initialize Bayesian blocks with lc.get_bblocks() first!"
788+
raise AttributeError(msg) from err
790789

791790
# Merge neighbouring threshold blocks and delete edges
792791
block_mask = np.ones(len(self.block_val), dtype=bool)
@@ -857,9 +856,8 @@ def plot_bblocks(
857856
**kwargs,
858857
)
859858
except AttributeError:
860-
raise AttributeError(
861-
"Initialize Bayesian blocks with .get_bblocks() first!"
862-
)
859+
msg = "Initialize Bayesian blocks with .get_bblocks() first!"
860+
raise AttributeError(msg) from err
863861

864862
# -------------------------------------------------------------------------
865863
def bb_i(self, t: float):
File renamed without changes.

0 commit comments

Comments
 (0)