We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f650a2 commit 26d406fCopy full SHA for 26d406f
pandas/io/sas/sasreader.py
@@ -3,13 +3,10 @@
3
"""
4
from __future__ import annotations
5
6
-from abc import (
7
- ABCMeta,
8
- abstractmethod,
9
-)
10
from typing import (
11
TYPE_CHECKING,
12
Hashable,
+ Protocol,
13
overload,
14
)
15
@@ -31,19 +28,16 @@
31
28
from pandas import DataFrame
32
29
33
30
34
-# TODO(PY38): replace with Protocol in Python 3.8
35
-class ReaderBase(metaclass=ABCMeta):
+class ReaderBase(Protocol):
36
37
Protocol for XportReader and SAS7BDATReader classes.
38
39
40
- @abstractmethod
41
def read(self, nrows: int | None = None) -> DataFrame:
42
- pass
+ ...
43
44
45
def close(self) -> None:
46
47
48
def __enter__(self) -> ReaderBase:
49
return self
0 commit comments