Skip to content

Commit

Permalink
delete unused annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
d-chambers committed Jan 4, 2024
1 parent b2e537f commit a963167
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
13 changes: 0 additions & 13 deletions src/obsplus/events/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions tests/test_utils/test_stations_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a963167

Please sign in to comment.