Skip to content

Commit

Permalink
Remove support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Oct 22, 2024
1 parent aefafcd commit 2fbcce9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v4
Expand Down
41 changes: 21 additions & 20 deletions audplot/core/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections.abc import Callable
from collections.abc import Sequence
import math
import typing
import warnings

import matplotlib
Expand Down Expand Up @@ -92,11 +93,11 @@ def cepstrum(


def confusion_matrix(
truth: typing.Union[typing.Sequence, pd.Series],
prediction: typing.Union[typing.Sequence, pd.Series],
truth: Sequence | pd.Series,
prediction: Sequence | pd.Series,
*,
labels: typing.Sequence = None,
label_aliases: typing.Dict = None,
labels: Sequence = None,
label_aliases: dict = None,
percentage: bool = False,
show_both: bool = False,
ax: matplotlib.axes.Axes = None,
Expand Down Expand Up @@ -235,15 +236,15 @@ def combine_string(x, y):


def detection_error_tradeoff(
x: typing.Union[typing.Sequence, pd.Series],
y: typing.Union[typing.Sequence, pd.Series],
x: Sequence | pd.Series,
y: Sequence | pd.Series,
*,
error_rates: bool = False,
xlim: typing.Sequence = [0.001, 0.5],
ylim: typing.Sequence = [0.001, 0.5],
xlim: Sequence = [0.001, 0.5],
ylim: Sequence = [0.001, 0.5],
label: str = None,
ax: matplotlib.axes.Axes = None,
) -> typing.Callable:
) -> Callable:
r"""Detection error tradeoff curve.
A `detection error tradeoff (DET)`_ curve
Expand Down Expand Up @@ -360,8 +361,8 @@ def detection_error_tradeoff(


def distribution(
truth: typing.Union[typing.Sequence, pd.Series],
prediction: typing.Union[typing.Sequence, pd.Series],
truth: Sequence | pd.Series,
prediction: Sequence | pd.Series,
*,
ax: matplotlib.axes.Axes = None,
):
Expand Down Expand Up @@ -411,7 +412,7 @@ def distribution(


def human_format(
number: typing.Union[int, float],
number: int | float,
) -> str:
r"""Display large or small numbers in a human readable way.
Expand Down Expand Up @@ -501,8 +502,8 @@ def human_format(


def scatter(
truth: typing.Union[typing.Sequence, pd.Series],
prediction: typing.Union[typing.Sequence, pd.Series],
truth: Sequence | pd.Series,
prediction: Sequence | pd.Series,
*,
fit: bool = False,
order: int = 1,
Expand Down Expand Up @@ -552,8 +553,8 @@ def scatter(


def series(
truth: typing.Union[typing.Sequence, pd.Series],
prediction: typing.Union[typing.Sequence, pd.Series],
truth: Sequence | pd.Series,
prediction: Sequence | pd.Series,
*,
ax: matplotlib.axes.Axes = None,
):
Expand Down Expand Up @@ -720,10 +721,10 @@ def waveform(
x: np.ndarray,
*,
text: str = None,
color: typing.Union[str, typing.Sequence[float]] = "#E13B41",
background: typing.Union[str, typing.Sequence[float]] = "#FFFFFF00",
color: str | Sequence[float] = "#E13B41",
background: str, | Sequence[float] = "#FFFFFF00",
linewidth: float = 1.5,
ylim: typing.Sequence[float] = (-1, 1),
ylim: Sequence[float] = (-1, 1),
ax: matplotlib.axes.Axes = None,
):
r"""Plot waveform of a mono signal.
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ classifiers = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand Down

0 comments on commit 2fbcce9

Please sign in to comment.