Skip to content

Commit

Permalink
Linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 1, 2021
1 parent b4b0bfe commit 7cfc048
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
10 changes: 5 additions & 5 deletions mathematical/outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@


def mad_outliers(
dataset: Sequence[float],
dataset: Sequence,
strip_zero: bool = True,
threshold: int = 3,
) -> Tuple[List[float], List[float]]:
Expand Down Expand Up @@ -98,7 +98,7 @@ def mad_outliers(


def two_stdev(
dataset: Sequence[float],
dataset: Sequence,
strip_zero: bool = True,
) -> Tuple[List[float], List[float]]:
"""
Expand All @@ -114,7 +114,7 @@ def two_stdev(


def stdev_outlier(
dataset: Sequence[float],
dataset: Sequence,
strip_zero: bool = True,
rng: int = 2,
) -> Tuple[List[float], List[float]]:
Expand Down Expand Up @@ -152,7 +152,7 @@ def stdev_outlier(


def quartile_outliers(
dataset: Sequence[float],
dataset: Sequence,
strip_zero: bool = True,
) -> Tuple[List[float], List[float]]:
"""
Expand Down Expand Up @@ -195,7 +195,7 @@ def quartile_outliers(


def spss_outliers(
dataset: Sequence[float],
dataset: Sequence,
strip_zero: bool = True,
mode: str = "all",
) -> Tuple[List[float], List[float], List[float]]:
Expand Down
27 changes: 15 additions & 12 deletions tests/test_data_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@

# this package
from mathematical.data_frames import (
df_count,
df_data_points,
df_delta,
df_delta_relative,
df_log,
df_log_stdev,
df_mean,
df_median,
df_outliers, df_percentage,
df_stdev, MAD, QUARTILES, STDEV2,
)
MAD,
QUARTILES,
STDEV2,
df_count,
df_data_points,
df_delta,
df_delta_relative,
df_log,
df_log_stdev,
df_mean,
df_median,
df_outliers,
df_percentage,
df_stdev
)


@pytest.fixture()
Expand Down Expand Up @@ -140,4 +144,3 @@ def test_df_outliers(base_df):

df["STDEV2 Outliers"] = df.apply(df_outliers, args=[samples, STDEV2], axis=1)
assert list(df["STDEV2 Outliers"][0]) == [sys.maxsize]

2 changes: 1 addition & 1 deletion tests/test_outliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Iterable

# 3rd party
import numpy
import numpy # type: ignore
import pytest
from coincidence.regressions import AdvancedDataRegressionFixture

Expand Down

0 comments on commit 7cfc048

Please sign in to comment.