Skip to content

Commit b7ddf53

Browse files
[pre-commit.ci] pre-commit autoupdate (#34)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/docformatter: eb1df347edd128b30cd3368dddc3aa65edcfac38 → v1.7.5](PyCQA/docformatter@eb1df34...v1.7.5) - [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.6...v0.9.9) - [github.com/PyCQA/isort: 6.0.0 → 6.0.1](PyCQA/isort@6.0.0...6.0.1) * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * unsure if this will work --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
1 parent e8df741 commit b7ddf53

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
22
repos:
33
- repo: https://github.com/PyCQA/docformatter
4-
rev: eb1df347edd128b30cd3368dddc3aa65edcfac38
4+
rev: HEAD
55
hooks:
66
- id: docformatter
77
args: [--in-place, --pre-summary-newline, --make-summary-multi]
@@ -12,7 +12,7 @@ repos:
1212
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
1313
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: 'v0.9.6'
15+
rev: 'v0.9.9'
1616
hooks:
1717
- id: ruff
1818
args: ['--fix', '--unsafe-fixes']
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: black
2323
- repo: https://github.com/PyCQA/isort
24-
rev: 6.0.0
24+
rev: 6.0.1
2525
hooks:
2626
- id: isort
2727
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -39,3 +39,6 @@ repos:
3939
rev: v2.4.1
4040
hooks:
4141
- id: codespell
42+
ci:
43+
autofix_prs: false
44+
autoupdate_schedule: "quarterly"

scraper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ def process_html(url: str, data: pd.DataFrame) -> pd.DataFrame:
294294
new_rows = rows[0].text.split("\n\n")
295295
# Time is one single element whereas each event text is a separate element
296296
dates, text = new_rows[0].strip().split("\n"), new_rows[1:-1]
297+
if dates in [[""], [" "], []]:
298+
logger.warning(f"No data found for {url}")
299+
return data
297300
instrument = ["HMI" if "HMI" in new_row else "AIA" if "AIA" in new_row else "SDO" for new_row in text]
298301
comment = [new_row.replace("\n", " ") for new_row in text]
299302
start_dates = [(_format_date(_clean_date(date), year)) for date in dates]

0 commit comments

Comments
 (0)