diff --git a/src/obsplus/events/schema.py b/src/obsplus/events/schema.py index dd6422f0..0ed068f6 100644 --- a/src/obsplus/events/schema.py +++ b/src/obsplus/events/schema.py @@ -11,7 +11,6 @@ import obspy.core.event as ev -from obspy.core.util.attribdict import AttribDict from obspy import UTCDateTime from pydantic import ( model_validator, @@ -135,18 +134,6 @@ SourceTimeFunctionType = Literal["box car", "triangle", "trapezoid", "unknown"] -def _recursive_dict(attrib): - """recursively turn all AttribDict s into normal dicts.""" - out = dict(attrib) - for i, v in out.items(): - if isinstance(v, AttribDict): - out[i] = _recursive_dict(v) - return out - - -AttribDictType = Annotated[AttribDict, PlainValidator(_recursive_dict)] - - def _to_datetime(dt: Union[datetime, UTCDateTime]) -> datetime: """Convert object to datatime.""" return UTCDateTime(dt).datetime diff --git a/tests/test_utils/test_stations_utils.py b/tests/test_utils/test_stations_utils.py index 95dbda14..cedf609a 100644 --- a/tests/test_utils/test_stations_utils.py +++ b/tests/test_utils/test_stations_utils.py @@ -92,10 +92,7 @@ def inv_df_duplicate_channels(self, df_from_inv): year = to_timedelta64(3600) * 24 * 365 sub_fur["end_date"] = sub_fur["start_date"] - year sub_fur["start_date"] = sub_fur["end_date"] - 3 * year - new_df = ( - pd.concat([df_from_inv, sub_fur], axis=0) - .reset_index(drop=True) - ) + new_df = pd.concat([df_from_inv, sub_fur], axis=0).reset_index(drop=True) return new_df def test_type(self, inv_from_df):