File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def isna(obj: Index | list | ArrayLike) -> npt.NDArray[np.bool_]: ...
30
30
@overload
31
31
def isna (obj : Scalar ) -> bool : ...
32
32
@overload
33
- def isna (obj : NaTType | NAType ) -> Literal [True ]: ...
33
+ def isna (obj : NaTType | NAType | None ) -> Literal [True ]: ...
34
34
35
35
isnull = isna
36
36
@@ -43,6 +43,6 @@ def notna(obj: Index | list | ArrayLike) -> npt.NDArray[np.bool_]: ...
43
43
@overload
44
44
def notna (obj : Scalar ) -> bool : ...
45
45
@overload
46
- def notna (obj : NaTType | NAType ) -> Literal [False ]: ...
46
+ def notna (obj : NaTType | NAType | None ) -> Literal [False ]: ...
47
47
48
48
notnull = notna
Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ def test_isna() -> None:
136
136
assert check (assert_type (pd .isna (pd .NaT ), Literal [True ]), bool )
137
137
assert not check (assert_type (pd .notna (pd .NaT ), Literal [False ]), bool )
138
138
139
+ assert check (assert_type (pd .isna (None ), Literal [True ]), bool )
140
+ assert not check (assert_type (pd .notna (None ), Literal [False ]), bool )
141
+
139
142
check (assert_type (pd .isna (2.5 ), bool ), bool )
140
143
check (assert_type (pd .notna (2.5 ), bool ), bool )
141
144
You can’t perform that action at this time.
0 commit comments