Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 3, 2023
1 parent 3bb83c9 commit f1ae455
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/particle/particle/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
from __future__ import annotations

import os
import warnings
from datetime import date
from io import StringIO
from pathlib import Path
import warnings
from typing import Any, Callable, Iterable, TextIO, TypeVar

import numpy as np
Expand Down Expand Up @@ -408,15 +408,21 @@ def produce_files(
# Check it there are rows only present in the .mcd file specified by year,
# in which case we need to update our curated files!
ext_table_excl = pd.DataFrame(
ext_table[~(ext_table.index.isin(full_table.index) | ext_table.index.isin(addons.index))]
,
columns= full_table.columns,
)
ext_table[
~(
ext_table.index.isin(full_table.index)
| ext_table.index.isin(addons.index)
)
],
columns=full_table.columns,
)
if len(ext_table_excl) > 0:
mcd_year = "mass_width_" + year + ".mcd"
warnings.warn(f"""{mcd_year!r} contains the following {len(ext_table_excl)} new entries:"
warnings.warn(
f"""{mcd_year!r} contains the following {len(ext_table_excl)} new entries:"
{ext_table_excl.index.to_list()}
Curation needs an update!""")
Curation needs an update!"""
)

full_table = pd.concat([full_table, addons])

Expand Down

0 comments on commit f1ae455

Please sign in to comment.