Skip to content

Commit 1685747

Browse files
Merge pull request #9 from swagner-astro/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 1302920 + f585203 commit 1685747

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: trailing-whitespace
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: "v0.12.3"
19+
rev: "v0.12.5"
2020
hooks:
2121
# id: ruff-check would go here if using both
2222
- id: ruff-format

src/lightcurves/LC.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ def get_gti_iis(
186186
if n_pick:
187187
# only consider the n_pick longest GTIs
188188
# TBD: double check, might compute index differences, not time gaps..
189-
gap_len = np.array([t - s for s, t in zip(GTI_start_ii, GTI_end_ii, strict=False)])
189+
gap_len = np.array(
190+
[t - s for s, t in zip(GTI_start_ii, GTI_end_ii, strict=False)]
191+
)
190192
gap_len1 = np.sort(gap_len)
191193
ii = [x for x in range(len(gap_len)) if gap_len[x] in gap_len1[-n_pick:]]
192194
# n_gaps = considered gaps (longest not gaps)
@@ -332,9 +334,7 @@ def __repr__(self):
332334
def __len__(self):
333335
return len(self.time)
334336

335-
def __getitem__(
336-
self, inbr: int | slice | list[int]
337-
) -> np.ndarray | LightCurve:
337+
def __getitem__(self, inbr: int | slice | list[int]) -> np.ndarray | LightCurve:
338338
"""
339339
Access elements or subsets of the LightCurve using indexing or slicing.
340340
@@ -583,9 +583,7 @@ def plot_shade(
583583
y1 = np.ones(len(x)) * np.min(self.flux)
584584
ax.fill_between(x, y, y1, step="mid", alpha=0.2, zorder=0, **kwargs)
585585

586-
def plot_grid(
587-
self, spacing: float = 10, ax: Axes | None = None, **kwargs
588-
) -> None:
586+
def plot_grid(self, spacing: float = 10, ax: Axes | None = None, **kwargs) -> None:
589587
"""
590588
Add a minor grid to the time axis at specified spacing.
591589

0 commit comments

Comments
 (0)