Skip to content

Commit fd21cb4

Browse files
committed
TYP: Fix typing after upgrading pandas-stubs
1 parent ea27e33 commit fd21cb4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

plotnine/_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def remove_missing(
513513
if finite:
514514
lst = [np.inf, -np.inf]
515515
to_replace = {v: lst for v in vars}
516-
data.replace(to_replace, np.nan, inplace=True) # pyright: ignore[reportArgumentType,reportCallIssue]
516+
data.replace(to_replace, np.nan, inplace=True)
517517
txt = "non-finite"
518518
else:
519519
txt = "missing"

plotnine/mapping/_eval_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def factor(
4848
`categories` attribute (which in turn is the `categories` argument, if
4949
provided).
5050
"""
51-
return pd.Categorical(values, categories=categories, ordered=None)
51+
return pd.Categorical(values, categories=categories, ordered=None) # pyright: ignore[reportArgumentType]
5252

5353

5454
def reorder(x, y, fun=np.median, ascending=True):

plotnine/scales/scale_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def view(
156156
range = self.dimension(limits=limits)
157157

158158
breaks_d = self.get_breaks(limits)
159-
breaks = self.map(pd.Categorical(breaks_d))
159+
breaks = self.map(pd.Categorical(breaks_d)) # pyright: ignore[reportArgumentType]
160160
minor_breaks = []
161161
labels = self.get_labels(breaks_d)
162162

0 commit comments

Comments
 (0)