Skip to content

Commit c293a88

Browse files
authored
REF: update iNaT imports (#34015)
1 parent 71112bc commit c293a88

File tree

13 files changed

+13
-17
lines changed

13 files changed

+13
-17
lines changed

pandas/_libs/tslib.pyx

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ from pandas._libs.tslibs.conversion cimport (
5050
_TSObject, convert_datetime_to_tsobject,
5151
get_datetime64_nanos)
5252

53-
# many modules still look for NaT and iNaT here despite them not being needed
54-
from pandas._libs.tslibs.nattype import nat_strings, iNaT # noqa:F821
53+
from pandas._libs.tslibs.nattype import nat_strings
5554
from pandas._libs.tslibs.nattype cimport (
5655
checknull_with_nat, NPY_NAT, c_NaT as NaT)
5756

pandas/core/algorithms.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
import numpy as np
1111

12-
from pandas._libs import Timestamp, algos, hashtable as htable, lib
13-
from pandas._libs.tslib import iNaT
12+
from pandas._libs import Timestamp, algos, hashtable as htable, iNaT, lib
1413
from pandas._typing import AnyArrayLike, ArrayLike, DtypeObj
1514
from pandas.util._decorators import doc
1615

pandas/tests/base/test_fillna.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import numpy as np
77
import pytest
88

9-
from pandas._libs.tslib import iNaT
9+
from pandas._libs import iNaT
1010

1111
from pandas.core.dtypes.common import needs_i8_conversion
1212
from pandas.core.dtypes.generic import ABCMultiIndex

pandas/tests/base/test_unique.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pytest
33

4-
from pandas._libs.tslib import iNaT
4+
from pandas._libs import iNaT
55

66
from pandas.core.dtypes.common import is_datetime64tz_dtype, needs_i8_conversion
77

pandas/tests/base/test_value_counts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
import pytest
77

8-
from pandas._libs.tslib import iNaT
8+
from pandas._libs import iNaT
99
from pandas.compat.numpy import np_array_datetime64_compat
1010

1111
from pandas.core.dtypes.common import needs_i8_conversion

pandas/tests/extension/test_period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pytest
33

4-
from pandas._libs.tslib import iNaT
4+
from pandas._libs import iNaT
55

66
from pandas.core.dtypes.dtypes import PeriodDtype
77

pandas/tests/frame/indexing/test_indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas._libs.tslib import iNaT
7+
from pandas._libs import iNaT
88

99
from pandas.core.dtypes.common import is_float_dtype, is_integer
1010

pandas/tests/indexes/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas._libs.tslib import iNaT
7+
from pandas._libs import iNaT
88

99
from pandas.core.dtypes.common import is_datetime64tz_dtype
1010
from pandas.core.dtypes.dtypes import CategoricalDtype

pandas/tests/series/methods/test_rank.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import numpy as np
44
import pytest
55

6+
from pandas._libs import iNaT
67
from pandas._libs.algos import Infinity, NegInfinity
7-
from pandas._libs.tslib import iNaT
88
import pandas.util._test_decorators as td
99

1010
from pandas import NaT, Series, Timestamp, date_range

pandas/tests/series/test_constructors.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import numpy.ma as ma
66
import pytest
77

8-
from pandas._libs import lib
9-
from pandas._libs.tslib import iNaT
8+
from pandas._libs import iNaT, lib
109

1110
from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype
1211
from pandas.core.dtypes.dtypes import CategoricalDtype

pandas/tests/series/test_missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
import pytz
66

7-
from pandas._libs.tslib import iNaT
7+
from pandas._libs import iNaT
88

99
import pandas as pd
1010
from pandas import (

pandas/tests/test_take.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas._libs.tslib import iNaT
7+
from pandas._libs import iNaT
88

99
import pandas._testing as tm
1010
import pandas.core.algorithms as algos

pandas/tests/tslibs/test_conversion.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import pytest
55
from pytz import UTC
66

7-
from pandas._libs.tslib import iNaT
8-
from pandas._libs.tslibs import conversion, timezones, tzconversion
7+
from pandas._libs.tslibs import conversion, iNaT, timezones, tzconversion
98

109
from pandas import Timestamp, date_range
1110
import pandas._testing as tm

0 commit comments

Comments
 (0)