Skip to content

Commit

Permalink
mypy fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed Aug 1, 2023
1 parent 6058c3c commit 6d61883
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/tests/extension/decimal/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ def __init__(self, values, dtype=None, copy=False, context=None) -> None:
if np.isnan(val):
values[i] = DecimalDtype.na_value
else:
values[i] = DecimalDtype.type(val)
# error: Argument 1 has incompatible type "float | int |
# integer[Any]"; expected "Decimal | float | str | tuple[int,
# Sequence[int], int]"
values[i] = DecimalDtype.type(val) # type: ignore[arg-type]
elif not isinstance(val, decimal.Decimal):
raise TypeError("All values must be of type " + str(decimal.Decimal))
values = np.asarray(values, dtype=object)
Expand Down

0 comments on commit 6d61883

Please sign in to comment.