Skip to content

REF: update iNaT imports #34015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ from pandas._libs.tslibs.conversion cimport (
_TSObject, convert_datetime_to_tsobject,
get_datetime64_nanos)

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

Expand Down
3 changes: 1 addition & 2 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

import numpy as np

from pandas._libs import Timestamp, algos, hashtable as htable, lib
from pandas._libs.tslib import iNaT
from pandas._libs import Timestamp, algos, hashtable as htable, iNaT, lib
from pandas._typing import AnyArrayLike, ArrayLike, DtypeObj
from pandas.util._decorators import doc

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/base/test_fillna.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

from pandas.core.dtypes.common import needs_i8_conversion
from pandas.core.dtypes.generic import ABCMultiIndex
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/base/test_unique.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

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

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/base/test_value_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT
from pandas.compat.numpy import np_array_datetime64_compat

from pandas.core.dtypes.common import needs_i8_conversion
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/extension/test_period.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

from pandas.core.dtypes.dtypes import PeriodDtype

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/frame/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

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

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

from pandas.core.dtypes.common import is_datetime64tz_dtype
from pandas.core.dtypes.dtypes import CategoricalDtype
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/series/methods/test_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import numpy as np
import pytest

from pandas._libs import iNaT
from pandas._libs.algos import Infinity, NegInfinity
from pandas._libs.tslib import iNaT
import pandas.util._test_decorators as td

from pandas import NaT, Series, Timestamp, date_range
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/series/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import numpy.ma as ma
import pytest

from pandas._libs import lib
from pandas._libs.tslib import iNaT
from pandas._libs import iNaT, lib

from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype
from pandas.core.dtypes.dtypes import CategoricalDtype
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/series/test_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
import pytz

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

import pandas as pd
from pandas import (
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_take.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np
import pytest

from pandas._libs.tslib import iNaT
from pandas._libs import iNaT

import pandas._testing as tm
import pandas.core.algorithms as algos
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/tslibs/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import pytest
from pytz import UTC

from pandas._libs.tslib import iNaT
from pandas._libs.tslibs import conversion, timezones, tzconversion
from pandas._libs.tslibs import conversion, iNaT, timezones, tzconversion

from pandas import Timestamp, date_range
import pandas._testing as tm
Expand Down