Skip to content

Commit bddadcb

Browse files
committed
comments
1 parent ae8e338 commit bddadcb

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

tests/series/arithmetic/test_floordiv.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,24 +154,26 @@ def _05() -> None: # pyright: ignore[reportUnusedFunction]
154154
check(assert_type(left_i.floordiv(f), pd.Series), pd.Series, np.floating)
155155

156156
def _23() -> None: # pyright: ignore[reportUnusedFunction]
157-
left_i.floordiv(c) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
157+
assert_type(
158+
left_i.floordiv(c), # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportAssertTypeFailure,reportCallIssue]
159+
Never,
160+
)
158161

159162
def _24() -> None: # pyright: ignore[reportUnusedFunction]
160-
left_i.floordiv(s) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
163+
assert_type(
164+
left_i.floordiv(s), # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportAssertTypeFailure,reportCallIssue]
165+
Never,
166+
)
161167

162168
def _25() -> None: # pyright: ignore[reportUnusedFunction]
163169
assert_type(left_i.floordiv(d), Never)
164170

165171
check(assert_type(left_i.rfloordiv(b), pd.Series), pd.Series, np.integer)
166172
check(assert_type(left_i.rfloordiv(i), pd.Series), pd.Series, np.integer)
167173
check(assert_type(left_i.rfloordiv(f), pd.Series), pd.Series, np.floating)
168-
169-
def _33() -> None: # pyright: ignore[reportUnusedFunction]
174+
if TYPE_CHECKING_INVALID_USAGE:
170175
left_i.rfloordiv(c) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
171-
172-
def _34() -> None: # pyright: ignore[reportUnusedFunction]
173176
left_i.rfloordiv(s) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
174-
175177
check(
176178
assert_type(left_i.rfloordiv(d), "pd.Series[pd.Timedelta]"),
177179
pd.Series,
@@ -257,11 +259,8 @@ def test_floordiv_pd_series(left_i: pd.Series) -> None:
257259
check(assert_type(left_i.floordiv(b), pd.Series), pd.Series, np.integer)
258260
check(assert_type(left_i.floordiv(i), pd.Series), pd.Series, np.integer)
259261
check(assert_type(left_i.floordiv(f), pd.Series), pd.Series, np.floating)
260-
261-
def _23() -> None: # pyright: ignore[reportUnusedFunction]
262-
left_i.floordiv(c) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
263-
264262
if TYPE_CHECKING_INVALID_USAGE:
263+
left_i.floordiv(c) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
265264
left_i.floordiv(s) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
266265
# left_i.floordiv(d) # This invalid one cannot be detected by static type checking
267266

tests/series/arithmetic/test_truediv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def test_truediv_str_py_str(left_i: pd.Series) -> None:
388388

389389
if TYPE_CHECKING_INVALID_USAGE:
390390
_00 = left_i / s # type: ignore[operator] # pyright:ignore[reportOperatorIssue]
391-
_01: pd.Series = s / left_i # type: ignore[operator] # pyright:ignore[reportOperatorIssue]
391+
_01 = s / left_i # type: ignore[operator] # pyright:ignore[reportOperatorIssue]
392392

393393
left_i.truediv(s) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]
394394
left_i.div(s) # type: ignore[arg-type] # pyright: ignore[reportArgumentType,reportCallIssue]

0 commit comments

Comments
 (0)