Skip to content

Commit 5a13697

Browse files
authored
Rewrite dict call to literals (#38265)
1 parent 142ca08 commit 5a13697

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

pandas/core/indexes/numeric.py

+19-8
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import pandas.core.common as com
3030
from pandas.core.indexes.base import Index, maybe_extract_name
3131

32-
_num_index_shared_docs = dict()
32+
_num_index_shared_docs = {}
3333

3434

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

227-
_int64_descr_args = dict(klass="Int64Index", ltype="integer", dtype="int64", extra="")
227+
_int64_descr_args = {
228+
"klass": "Int64Index",
229+
"ltype": "integer",
230+
"dtype": "int64",
231+
"extra": "",
232+
}
228233

229234

230235
class IntegerIndex(NumericIndex):
@@ -286,9 +291,12 @@ class Int64Index(IntegerIndex):
286291
_default_dtype = np.dtype(np.int64)
287292

288293

289-
_uint64_descr_args = dict(
290-
klass="UInt64Index", ltype="unsigned integer", dtype="uint64", extra=""
291-
)
294+
_uint64_descr_args = {
295+
"klass": "UInt64Index",
296+
"ltype": "unsigned integer",
297+
"dtype": "uint64",
298+
"extra": "",
299+
}
292300

293301

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

316324

317-
_float64_descr_args = dict(
318-
klass="Float64Index", dtype="float64", ltype="float", extra=""
319-
)
325+
_float64_descr_args = {
326+
"klass": "Float64Index",
327+
"dtype": "float64",
328+
"ltype": "float",
329+
"extra": "",
330+
}
320331

321332

322333
class Float64Index(NumericIndex):

0 commit comments

Comments
 (0)