Skip to content

Commit

Permalink
Reformatting files
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerNick committed Feb 7, 2025
1 parent 41c40b0 commit 3c9eddb
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 48 deletions.
2 changes: 1 addition & 1 deletion tab_err/error_mechanism/_ecar.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _sample(
data: pd.DataFrame, # noqa: ARG002
column: str | int,
error_rate: float,
error_mask: pd.DataFrame
error_mask: pd.DataFrame,
) -> pd.DataFrame:
"""Creates an error mask according to the 'Erroneous Completely At Random' error mechanism.
Expand Down
6 changes: 1 addition & 5 deletions tab_err/error_type/_extraneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
# all data types are fine
pass

def _apply(self: Extraneous,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Extraneous, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Extraneous ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
# all dtypes are supported
pass

def _apply(
self: MissingValue,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: MissingValue, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the MissingValue ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_mistype.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
# all dtypes are supported
pass

def _apply(
self: Mistype,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Mistype, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Mistype ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_mojibake.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
msg = f"Column {column} does not contain values of the string dtype. Cannot insert Mojibake."
raise TypeError(msg)

def _apply(
self: Mojibake,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Mojibake, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Mojibake ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_outlier.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
msg = f"Column {column} does not contain numeric values. Cannot apply outliers."
raise TypeError(msg)

def _apply(
self: Outlier,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Outlier, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Outlier ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_permutate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
msg = f"Column {column} does not contain values of the string dtype. Cannot Permutate values."
raise TypeError(msg)

def _apply(
self: Permutate,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Permutate, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Permutate ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
msg = f"Column {column} does not contain values of the string dtype. Cannot Permutate values."
raise TypeError(msg)

def _apply(
self: Replace,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: Replace, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the Replace ErrorType to a column of data.
Args:
Expand Down
7 changes: 1 addition & 6 deletions tab_err/error_type/_wrong_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ def _check_type(data: pd.DataFrame, column: int | str) -> None:
msg = f"Column {column} does not contain scalars. Cannot apply a wrong unit."
raise TypeError(msg)

def _apply(
self: WrongUnit,
data: pd.DataFrame,
error_mask: pd.DataFrame,
column: int | str
) -> pd.Series:
def _apply(self: WrongUnit, data: pd.DataFrame, error_mask: pd.DataFrame, column: int | str) -> pd.Series:
"""Applies the WrongUnit ErrorType to a column of data.
Args:
Expand Down

0 comments on commit 3c9eddb

Please sign in to comment.