Skip to content

Commit 7ffc89b

Browse files
committed
read_html, read_parquet
1 parent 667bf3f commit 7ffc89b

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

pandas-stubs/__init__.pyi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ from pandas.io.api import (
114114
read_feather as read_feather,
115115
read_fwf as read_fwf,
116116
read_hdf as read_hdf,
117+
read_html as read_html,
117118
read_json as read_json,
119+
read_parquet as read_parquet,
118120
read_pickle as read_pickle,
119121
read_sas as read_sas,
120122
read_spss as read_spss,
@@ -126,15 +128,9 @@ from pandas.io.api import (
126128
from pandas.io.api import (
127129
read_excel as read_excel, # pyright: ignore[reportUnknownVariableType]
128130
)
129-
from pandas.io.api import (
130-
read_html as read_html, # pyright: ignore[reportUnknownVariableType]
131-
)
132131
from pandas.io.api import (
133132
read_orc as read_orc, # pyright: ignore[reportUnknownVariableType]
134133
)
135-
from pandas.io.api import (
136-
read_parquet as read_parquet, # pyright: ignore[reportUnknownVariableType]
137-
)
138134
from pandas.io.api import (
139135
read_sql as read_sql, # pyright: ignore[reportUnknownVariableType]
140136
)

pandas-stubs/io/api.pyi

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ from pandas.io.excel import (
77
read_excel as read_excel, # pyright: ignore[reportUnknownVariableType]
88
)
99
from pandas.io.feather_format import read_feather as read_feather
10-
from pandas.io.html import (
11-
read_html as read_html, # pyright: ignore[reportUnknownVariableType]
12-
)
10+
from pandas.io.html import read_html as read_html
1311
from pandas.io.json import read_json as read_json
1412
from pandas.io.orc import (
1513
read_orc as read_orc, # pyright: ignore[reportUnknownVariableType]
1614
)
17-
from pandas.io.parquet import (
18-
read_parquet as read_parquet, # pyright: ignore[reportUnknownVariableType]
19-
)
20-
from pandas.io.parsers import (
15+
from pandas.io.parquet import read_parquet as read_parquet
16+
from pandas.io.parsers.readers import (
2117
read_csv as read_csv,
2218
read_fwf as read_fwf,
2319
read_table as read_table,

pandas-stubs/io/html.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ from pandas._typing import (
2929
def read_html(
3030
io: FilePath | ReadBuffer[str],
3131
*,
32-
match: str | Pattern = ...,
32+
match: str | Pattern[str] = ...,
3333
flavor: HTMLFlavors | Sequence[HTMLFlavors] | None = ...,
3434
header: int | Sequence[int] | None = ...,
3535
index_col: int | Sequence[int] | list[HashableT1] | None = ...,

pandas-stubs/io/parquet.pyi

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from typing import Any
1+
from typing import (
2+
Any,
3+
Literal,
4+
TypeAlias,
5+
)
26

37
from pandas import DataFrame
48

@@ -10,13 +14,16 @@ from pandas._typing import (
1014
StorageOptions,
1115
)
1216

17+
_OP: TypeAlias = Literal["==", "=", ">", ">=", "<", "<=", "!=", "in", "not in"]
18+
_FILTER: TypeAlias = tuple[str, _OP, Any]
19+
1320
def read_parquet(
1421
path: FilePath | ReadBuffer[bytes],
1522
engine: ParquetEngine = "auto",
1623
columns: list[str] | None = None,
1724
storage_options: StorageOptions = None,
1825
dtype_backend: DtypeBackend = "numpy_nullable",
1926
filesystem: Any = None,
20-
filters: list[tuple] | list[list[tuple]] | None = None,
27+
filters: list[_FILTER] | list[list[_FILTER]] | None = None,
2128
**kwargs: Any,
2229
) -> DataFrame: ...

0 commit comments

Comments
 (0)