Skip to content

Commit

Permalink
CLN: Remove non-public classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtage committed Aug 22, 2022
1 parent 5d3648c commit 52e104d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 55 deletions.
51 changes: 0 additions & 51 deletions pandas-stubs/io/stata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import datetime
from io import BytesIO
from types import TracebackType
from typing import (
Hashable,
Literal,
Sequence,
overload,
Expand Down Expand Up @@ -76,18 +75,6 @@ class ValueLabelTypeMismatch(Warning): ...
class InvalidColumnName(Warning): ...

class StataParser:
DTYPE_MAP: dict[int, np.dtype] = ...
DTYPE_MAP_XML: dict[int, np.dtype] = ...
TYPE_MAP: list[tuple[int | str, ...]] = ...
TYPE_MAP_XML: dict[int, str] = ...
VALID_RANGE: dict[
str,
tuple[int, int] | tuple[np.float32, np.float32] | tuple[np.float64, np.float64],
] = ...
OLD_TYPE_MAPPING: dict[int, int] = ...
MISSING_VALUES: dict[str, int] = ...
NUMPY_TYPE_MAP: dict[str, str] = ...
RESERVED_WORDS: tuple[str, ...] = ...
def __init__(self) -> None: ...

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

class StataWriter(StataParser):
type_converters: dict[str, type[np.dtype]] = ...
def __init__(
self,
fname: FilePath | WriteBuffer[bytes],
Expand All @@ -151,40 +137,3 @@ class StataWriter(StataParser):
value_labels: dict[HashableT, dict[float, str]] | None = ...,
) -> None: ...
def write_file(self) -> None: ...

class StataWriter117(StataWriter):
def __init__(
self,
fname: FilePath | WriteBuffer[bytes],
data: DataFrame,
convert_dates: dict[HashableT, StataDateFormat] | None = ...,
write_index: bool = ...,
byteorder: str | None = ...,
time_stamp: datetime.datetime | None = ...,
data_label: str | None = ...,
variable_labels: dict[HashableT, str] | None = ...,
convert_strl: Sequence[Hashable] | None = ...,
compression: CompressionOptions = ...,
storage_options: StorageOptions = ...,
*,
value_labels: dict[HashableT, dict[float, str]] | None = ...,
) -> None: ...

class StataWriterUTF8(StataWriter117):
def __init__(
self,
fname: FilePath | WriteBuffer[bytes],
data: DataFrame,
convert_dates: dict[HashableT, StataDateFormat] | None = ...,
write_index: bool = ...,
byteorder: str | None = ...,
time_stamp: datetime.datetime | None = ...,
data_label: str | None = ...,
variable_labels: dict[HashableT, str] | None = ...,
convert_strl: Sequence[Hashable] | None = ...,
version: Literal[118, 119] | None = ...,
compression: CompressionOptions = ...,
storage_options: StorageOptions = ...,
*,
value_labels: dict[HashableT, dict[float, str]] | None = ...,
) -> None: ...
6 changes: 2 additions & 4 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pandas import (
DataFrame,
read_clipboard,
read_stata,
)
from pandas._testing import ensure_clean
import pytest
Expand All @@ -11,10 +12,7 @@

from pandas.io.clipboard import PyperclipException
from pandas.io.parsers import TextFileReader
from pandas.io.stata import (
StataReader,
read_stata,
)
from pandas.io.stata import StataReader

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

Expand Down

0 comments on commit 52e104d

Please sign in to comment.