Skip to content

Commit 837daf1

Browse files
CLN: misc cleanups from LGTM (pandas-dev#33724)
1 parent 4617389 commit 837daf1

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

pandas/_testing.py

-6
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,10 @@ def write_to_compressed(compression, path, data, dest="test"):
279279
ValueError : An invalid compression value was passed in.
280280
"""
281281
if compression == "zip":
282-
import zipfile
283-
284282
compress_method = zipfile.ZipFile
285283
elif compression == "gzip":
286-
import gzip
287-
288284
compress_method = gzip.GzipFile
289285
elif compression == "bz2":
290-
import bz2
291-
292286
compress_method = bz2.BZ2File
293287
elif compression == "xz":
294288
compress_method = _get_lzma_file(lzma)

pandas/core/series.py

-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ def __init__(
275275
"Cannot construct a Series from an ndarray with "
276276
"compound dtype. Use DataFrame instead."
277277
)
278-
pass
279278
elif isinstance(data, ABCSeries):
280279
if index is None:
281280
index = data.index

0 commit comments

Comments
 (0)