Skip to content

Commit 7b439d3

Browse files
committed
Use specific Dict types
1 parent 68e59fe commit 7b439d3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pandas/io/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def get_filepath_or_buffer(
176176
compression: CompressionOptions = None,
177177
mode: ModeVar = None, # type: ignore[assignment]
178178
storage_options: StorageOptions = None,
179-
headers: dict = {},
179+
headers: Dict[str, Any] = {},
180180
) -> IOargs[ModeVar, EncodingVar]:
181181
"""
182182
If the filepath_or_buffer is a url, translate and return the buffer.

pandas/io/json/_json.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from io import BytesIO, StringIO
44
from itertools import islice
55
import os
6-
from typing import IO, Any, Callable, List, Optional, Type
6+
from typing import IO, Any, Callable, Dict, List, Optional, Type
77

88
import numpy as np
99

@@ -377,7 +377,7 @@ def read_json(
377377
compression: CompressionOptions = "infer",
378378
nrows: Optional[int] = None,
379379
storage_options: StorageOptions = None,
380-
headers: dict = {},
380+
headers: Dict[str, Any] = {},
381381
):
382382
"""
383383
Convert a JSON string to pandas object.

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def read_csv(
604604
memory_map=False,
605605
float_precision=None,
606606
storage_options: StorageOptions = None,
607-
headers={},
607+
headers: Dict[str, Any] = {},
608608
):
609609
# gh-23761
610610
#

0 commit comments

Comments
 (0)