Skip to content

Commit 99b9cb7

Browse files
committed
TYP: Remove unnecessary type ignores
1 parent 6cf07be commit 99b9cb7

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

plotnine/_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def _id_var(x: AnyArrayLike, drop: bool = False) -> list[int]:
362362
lst = match(x, levels)
363363
lst = [item + 1 for item in lst]
364364

365-
return lst # pyright: ignore[reportReturnType]
365+
return lst
366366

367367

368368
def join_keys(x, y, by=None):

plotnine/scales/scale_continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def map(
396396
scaled = [na_value if x == "nan" else x for x in scaled]
397397
else:
398398
scaled[pd.isna(scaled)] = na_value
399-
return scaled # pyright: ignore[reportReturnType]
399+
return scaled
400400

401401
def get_breaks(
402402
self, limits: Optional[tuple[float, float]] = None

plotnine/scales/scale_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def map(self, x, limits: Optional[Sequence[str]] = None) -> Sequence[Any]:
206206
pal = np.asarray(pal, dtype=object)
207207
idx = np.asarray(match(x, limits))
208208
try:
209-
pal_match = [pal[i] if i >= 0 else None for i in idx] # pyright: ignore[reportCallIssue,reportArgumentType]
209+
pal_match = [pal[i] if i >= 0 else None for i in idx]
210210
except IndexError:
211211
# Deal with missing data
212212
# - Insert NaN where there is no match

plotnine/stats/stat_density_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def contour_lines(X, Y, Z, levels: int | FloatArrayLike):
155155
level_values = []
156156
start_pid = 1
157157
for level in levels:
158-
vertices, *_ = cgen.create_contour(level) # pyright: ignore[reportArgumentType]
158+
vertices, *_ = cgen.create_contour(level)
159159
for pid, piece in enumerate(vertices, start=start_pid):
160160
n = len(piece) # pyright: ignore
161161
segments.append(piece)

0 commit comments

Comments
 (0)