From f1ae45529bf5b8adefa83f617087517a804d7e63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 15:20:56 +0000 Subject: [PATCH] style: pre-commit fixes --- src/particle/particle/convert.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/particle/particle/convert.py b/src/particle/particle/convert.py index 4568bdea..1d69bfe6 100644 --- a/src/particle/particle/convert.py +++ b/src/particle/particle/convert.py @@ -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 @@ -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])