File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
Read SAS sas7bdat or xport files.
3
3
"""
4
- from typing import TYPE_CHECKING , AnyStr , Optional , Union
4
+ from typing import AnyStr , Optional , Union
5
5
6
6
from pandas ._typing import FilePathOrBuffer
7
7
8
8
from pandas .io .common import stringify_path
9
-
10
- if TYPE_CHECKING :
11
- from pandas .io .sas .sas_xport import XportReader # noqa: F401
12
- from pandas .io .sas .sas7bdat import SAS7BDATReader # noqa: F401
9
+ from pandas .io .sas .sas7bdat import SAS7BDATReader
10
+ from pandas .io .sas .sas_xport import XportReader
13
11
14
12
15
13
def read_sas (
@@ -73,14 +71,10 @@ def read_sas(
73
71
74
72
reader : Union ["XportReader" , "SAS7BDATReader" ]
75
73
if format .lower () == "xport" :
76
- from pandas .io .sas .sas_xport import XportReader # noqa: F811
77
-
78
74
reader = XportReader (
79
75
filepath_or_buffer , index = index , encoding = encoding , chunksize = chunksize
80
76
)
81
77
elif format .lower () == "sas7bdat" :
82
- from pandas .io .sas .sas7bdat import SAS7BDATReader # noqa: F811
83
-
84
78
reader = SAS7BDATReader (
85
79
filepath_or_buffer , index = index , encoding = encoding , chunksize = chunksize
86
80
)
You can’t perform that action at this time.
0 commit comments