Skip to content

Rewrite dict call to literals #38265

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
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
27 changes: 19 additions & 8 deletions pandas/core/indexes/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import pandas.core.common as com
from pandas.core.indexes.base import Index, maybe_extract_name

_num_index_shared_docs = dict()
_num_index_shared_docs = {}


class NumericIndex(Index):
Expand Down Expand Up @@ -224,7 +224,12 @@ def _union(self, other, sort):
An Index instance can **only** contain hashable objects.
"""

_int64_descr_args = dict(klass="Int64Index", ltype="integer", dtype="int64", extra="")
_int64_descr_args = {
"klass": "Int64Index",
"ltype": "integer",
"dtype": "int64",
"extra": "",
}


class IntegerIndex(NumericIndex):
Expand Down Expand Up @@ -286,9 +291,12 @@ class Int64Index(IntegerIndex):
_default_dtype = np.dtype(np.int64)


_uint64_descr_args = dict(
klass="UInt64Index", ltype="unsigned integer", dtype="uint64", extra=""
)
_uint64_descr_args = {
"klass": "UInt64Index",
"ltype": "unsigned integer",
"dtype": "uint64",
"extra": "",
}


class UInt64Index(IntegerIndex):
Expand All @@ -314,9 +322,12 @@ def _convert_arr_indexer(self, keyarr):
return com.asarray_tuplesafe(keyarr, dtype=dtype)


_float64_descr_args = dict(
klass="Float64Index", dtype="float64", ltype="float", extra=""
)
_float64_descr_args = {
"klass": "Float64Index",
"dtype": "float64",
"ltype": "float",
"extra": "",
}


class Float64Index(NumericIndex):
Expand Down