Skip to content

Commit

Permalink
bugfixes mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuawe committed Nov 10, 2023
1 parent 9b25ec6 commit 68181b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plotsandgraphs/binary_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def plot_classification_report(y_test: np.ndarray,

bounds = np.linspace(0, 1, 11)
cmap = plt.cm.get_cmap('YlOrRd', len(bounds)+1)
norm = colors.BoundaryNorm(bounds, cmap.N)
norm = colors.BoundaryNorm(bounds, cmap.N) # type: ignore[attr-defined]

ax = sns.heatmap(df, mask=mask, annot=False, cmap=cmap, fmt='.3g',
cbar_kws={'ticks':bounds[::2], 'norm':norm, 'boundaries':bounds},
Expand Down
12 changes: 6 additions & 6 deletions plotsandgraphs/compare_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
import matplotlib.pyplot as plt
import matplotlib as mpl
import pandas as pd
from typing import List, Tuple
from typing import List, Tuple, Optional


def plot_raincloud(df: pd.DataFrame,
x_col: str,
y_col: str,
colors: List[str] = None,
order: List[str] = None,
title: str = None,
x_label: str = None,
x_range: Tuple[float, float] = None,
colors: Optional[List[str]] = None,
order: Optional[List[str]] = None,
title: Optional[str] = None,
x_label: Optional[str] = None,
x_range: Optional[Tuple[float, float]] = None,
show_violin = True,
show_scatter = True,
show_boxplot = True):
Expand Down

0 comments on commit 68181b8

Please sign in to comment.