Skip to content

Commit

Permalink
Revert "Remove more typing"
Browse files Browse the repository at this point in the history
This reverts commit d5c39ca.
  • Loading branch information
hagenw committed Jan 17, 2025
1 parent d5c39ca commit 2669a9c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion audformat/core/column.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations # allow typing without string

import typing
import warnings
Expand Down
45 changes: 25 additions & 20 deletions audformat/core/typing.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
from __future__ import annotations

from collections.abc import Sequence
import typing

import numpy as np
import pandas as pd


Files = str | Sequence[str] | pd.Index | pd.Series
Timestamps = (
float
| int
| str
| pd.Timedelta
| Sequence[float | int | str | pd.Timedelta]
| pd.Index
| pd.Series
)
Values = (
int
| float
| str
| pd.Timedelta
| Sequence[int | float | str | pd.Timedelta]
| np.ndarray
| pd.Series
)
Files = typing.Union[
str,
typing.Sequence[str],
pd.Index,
pd.Series,
]
Timestamps = typing.Union[
float,
int,
str,
pd.Timedelta,
typing.Sequence[typing.Union[float, int, str, pd.Timedelta]],
pd.Index,
pd.Series,
]
Values = typing.Union[
int,
float,
str,
pd.Timedelta,
typing.Sequence[typing.Union[int, float, str, pd.Timedelta],],
np.ndarray,
pd.Series,
]

0 comments on commit 2669a9c

Please sign in to comment.