Skip to content

Typing: Support New Mypy Semantic Analyzer #27070

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 13 commits into from
Jul 8, 2019
1 change: 0 additions & 1 deletion pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"""),
))
class IntervalArray(IntervalMixin, ExtensionArray):
dtype = IntervalDtype()
ndim = 1
can_hold_na = True
_na_value = _fill_value = np.nan
Expand Down
1 change: 0 additions & 1 deletion pandas/core/indexes/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def _join_i8_wrapper(joinf, **kwargs):

_freq = None

_box_func = TimedeltaArray._box_func
_bool_ops = TimedeltaArray._bool_ops
_object_ops = TimedeltaArray._object_ops
_field_ops = TimedeltaArray._field_ops
Expand Down
15 changes: 11 additions & 4 deletions pandas/io/json/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from .json import dumps, loads, read_json, to_json # noqa
from .normalize import json_normalize # noqa
from .table_schema import build_table_schema # noqa
from pandas.io.json._json import dumps, loads, read_json, to_json
from pandas.io.json._normalize import json_normalize
from pandas.io.json._table_schema import build_table_schema

del json, normalize, table_schema # noqa
__all__ = [
dumps,
loads,
read_json,
to_json,
json_normalize,
build_table_schema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those should be strings I think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

]
4 changes: 2 additions & 2 deletions pandas/io/json/json.py → pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from pandas.io.formats.printing import pprint_thing
from pandas.io.parsers import _validate_integer

from .normalize import _convert_to_line_delimits
from .table_schema import build_table_schema, parse_table_schema
from ._normalize import _convert_to_line_delimits
from ._table_schema import build_table_schema, parse_table_schema

loads = json.loads
dumps = json.dumps
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pandas/tests/io/json/test_json_table_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pandas import DataFrame
import pandas.util.testing as tm

from pandas.io.json.table_schema import (
from pandas.io.json._table_schema import (
as_json_table_type, build_table_schema, convert_json_field_to_pandas_type,
convert_pandas_type_to_json_field, set_default_names)

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/json/test_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pandas.util.testing as tm

from pandas.io.json import json_normalize
from pandas.io.json.normalize import nested_to_record
from pandas.io.json._normalize import nested_to_record


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/json/test_readlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pandas.util.testing import (
assert_frame_equal, assert_series_equal, ensure_clean)

from pandas.io.json.json import JsonReader
from pandas.io.json._json import JsonReader


@pytest.fixture
Expand Down