Skip to content

Commit 57bd9b8

Browse files
committed
MAINT: Move parsers->readers
1 parent e5f8bc6 commit 57bd9b8

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed

pandas-stubs/io/common.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from typing import (
2+
IO,
3+
AnyStr,
4+
Generic,
5+
)
6+
7+
from pandas._typing import CompressionDict
8+
9+
class IOHandles(Generic[AnyStr]):
10+
handle: IO[AnyStr]
11+
compression: CompressionDict
12+
created_handles: list[IO[AnyStr]]
13+
is_wrapped: bool
14+
def close(self) -> None: ...
15+
def __enter__(self) -> IOHandles[AnyStr]: ...
16+
def __exit__(self, *args: object) -> None: ...
17+
def __init__(self, handle, compression, created_handles, is_wrapped) -> None: ...

pandas-stubs/io/parsers/__init__.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from pandas.io.parsers.readers import (
2+
TextFileReader as TextFileReader,
3+
read_csv as read_csv,
4+
read_fwf as read_fwf,
5+
read_table as read_table,
6+
)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from typing import Any
2+
3+
from pandas._typing import (
4+
ArrayLike as ArrayLike,
5+
DtypeArg as DtypeArg,
6+
Scalar as Scalar,
7+
)
8+
9+
class ParserBase:
10+
names: Any # Incomplete
11+
orig_names: Any # Incomplete
12+
prefix: Any # Incomplete
13+
index_col: Any # Incomplete
14+
unnamed_cols: Any # Incomplete
15+
index_names: Any # Incomplete
16+
col_names: Any # Incomplete
17+
parse_dates: Any # Incomplete
18+
date_parser: Any # Incomplete
19+
dayfirst: Any # Incomplete
20+
keep_date_col: Any # Incomplete
21+
na_values: Any # Incomplete
22+
na_fvalues: Any # Incomplete
23+
na_filter: Any # Incomplete
24+
keep_default_na: Any # Incomplete
25+
dtype: Any # Incomplete
26+
converters: Any # Incomplete
27+
true_values: Any # Incomplete
28+
false_values: Any # Incomplete
29+
mangle_dupe_cols: Any # Incomplete
30+
infer_datetime_format: Any # Incomplete
31+
cache_dates: Any # Incomplete
32+
header: Any # Incomplete
33+
on_bad_lines: Any # Incomplete
34+
def __init__(self, kwds) -> None: ...
35+
def close(self) -> None: ...
File renamed without changes.

tests/test_io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import io
2-
import os
32
import os.path
43
import pathlib
54
from pathlib import Path

0 commit comments

Comments
 (0)