Skip to content

Commit 52e104d

Browse files
committed
CLN: Remove non-public classes
1 parent 5d3648c commit 52e104d

File tree

2 files changed

+2
-55
lines changed

2 files changed

+2
-55
lines changed

pandas-stubs/io/stata.pyi

-51
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import datetime
33
from io import BytesIO
44
from types import TracebackType
55
from typing import (
6-
Hashable,
76
Literal,
87
Sequence,
98
overload,
@@ -76,18 +75,6 @@ class ValueLabelTypeMismatch(Warning): ...
7675
class InvalidColumnName(Warning): ...
7776

7877
class StataParser:
79-
DTYPE_MAP: dict[int, np.dtype] = ...
80-
DTYPE_MAP_XML: dict[int, np.dtype] = ...
81-
TYPE_MAP: list[tuple[int | str, ...]] = ...
82-
TYPE_MAP_XML: dict[int, str] = ...
83-
VALID_RANGE: dict[
84-
str,
85-
tuple[int, int] | tuple[np.float32, np.float32] | tuple[np.float64, np.float64],
86-
] = ...
87-
OLD_TYPE_MAPPING: dict[int, int] = ...
88-
MISSING_VALUES: dict[str, int] = ...
89-
NUMPY_TYPE_MAP: dict[str, str] = ...
90-
RESERVED_WORDS: tuple[str, ...] = ...
9178
def __init__(self) -> None: ...
9279

9380
class StataReader(StataParser, abc.Iterator):
@@ -134,7 +121,6 @@ class StataReader(StataParser, abc.Iterator):
134121
def value_labels(self) -> dict[str, dict[float, str]]: ...
135122

136123
class StataWriter(StataParser):
137-
type_converters: dict[str, type[np.dtype]] = ...
138124
def __init__(
139125
self,
140126
fname: FilePath | WriteBuffer[bytes],
@@ -151,40 +137,3 @@ class StataWriter(StataParser):
151137
value_labels: dict[HashableT, dict[float, str]] | None = ...,
152138
) -> None: ...
153139
def write_file(self) -> None: ...
154-
155-
class StataWriter117(StataWriter):
156-
def __init__(
157-
self,
158-
fname: FilePath | WriteBuffer[bytes],
159-
data: DataFrame,
160-
convert_dates: dict[HashableT, StataDateFormat] | None = ...,
161-
write_index: bool = ...,
162-
byteorder: str | None = ...,
163-
time_stamp: datetime.datetime | None = ...,
164-
data_label: str | None = ...,
165-
variable_labels: dict[HashableT, str] | None = ...,
166-
convert_strl: Sequence[Hashable] | None = ...,
167-
compression: CompressionOptions = ...,
168-
storage_options: StorageOptions = ...,
169-
*,
170-
value_labels: dict[HashableT, dict[float, str]] | None = ...,
171-
) -> None: ...
172-
173-
class StataWriterUTF8(StataWriter117):
174-
def __init__(
175-
self,
176-
fname: FilePath | WriteBuffer[bytes],
177-
data: DataFrame,
178-
convert_dates: dict[HashableT, StataDateFormat] | None = ...,
179-
write_index: bool = ...,
180-
byteorder: str | None = ...,
181-
time_stamp: datetime.datetime | None = ...,
182-
data_label: str | None = ...,
183-
variable_labels: dict[HashableT, str] | None = ...,
184-
convert_strl: Sequence[Hashable] | None = ...,
185-
version: Literal[118, 119] | None = ...,
186-
compression: CompressionOptions = ...,
187-
storage_options: StorageOptions = ...,
188-
*,
189-
value_labels: dict[HashableT, dict[float, str]] | None = ...,
190-
) -> None: ...

tests/test_io.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pandas import (
33
DataFrame,
44
read_clipboard,
5+
read_stata,
56
)
67
from pandas._testing import ensure_clean
78
import pytest
@@ -11,10 +12,7 @@
1112

1213
from pandas.io.clipboard import PyperclipException
1314
from pandas.io.parsers import TextFileReader
14-
from pandas.io.stata import (
15-
StataReader,
16-
read_stata,
17-
)
15+
from pandas.io.stata import StataReader
1816

1917
DF = DataFrame({"a": [1, 2, 3], "b": [0.0, 0.0, 0.0]})
2018

0 commit comments

Comments
 (0)