Skip to content

Commit 098bba4

Browse files
kkraus14jreback
authored andcommitted
flake8 and more black
1 parent 078ba95 commit 098bba4

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

pandas/io/orc.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
""" orc compat """
22

3-
from warnings import catch_warnings
4-
53
from pandas.compat._optional import import_optional_dependency
64
from pandas.errors import AbstractMethodError
75

86
from pandas import DataFrame, get_option
97

10-
from pandas.io.common import get_filepath_or_buffer, is_gcs_url, is_s3_url
8+
from pandas.io.common import get_filepath_or_buffer
119

1210

1311
def get_engine(engine):

pandas/tests/io/test_orc.py

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
""" test orc compat """
22
import datetime
3-
from distutils.version import LooseVersion
43
import os
5-
from warnings import catch_warnings
64

75
import numpy as np
8-
import pytest
9-
10-
import pandas.util._test_decorators as td
11-
126
import pandas as pd
137
import pandas.util.testing as tm
14-
8+
import pytest
159
from pandas.io.orc import PyArrowImpl, get_engine, read_orc
1610

1711
try:
@@ -69,7 +63,7 @@ def test_invalid_engine(dirpath):
6963
inputfile = os.path.join(dirpath, "TestOrcFile.emptyFile.orc")
7064
engine = "foo"
7165
with pytest.raises(ValueError):
72-
pd.read_orc(inputfile, engine=engine, columns=["boolean1"])
66+
read_orc(inputfile, engine=engine, columns=["boolean1"])
7367

7468

7569
def test_orc_reader_empty(dirpath, engine):
@@ -100,7 +94,7 @@ def test_orc_reader_empty(dirpath, engine):
10094
expected[colname] = pd.Series(dtype=dtype)
10195

10296
inputfile = os.path.join(dirpath, "TestOrcFile.emptyFile.orc")
103-
got = pd.read_orc(inputfile, engine=engine, columns=columns)
97+
got = read_orc(inputfile, engine=engine, columns=columns)
10498

10599
tm.assert_equal(expected, got)
106100

@@ -120,7 +114,7 @@ def test_orc_reader_basic(dirpath, engine):
120114
expected = pd.DataFrame.from_dict(data)
121115

122116
inputfile = os.path.join(dirpath, "TestOrcFile.test1.orc")
123-
got = pd.read_orc(inputfile, engine=engine, columns=data.keys())
117+
got = read_orc(inputfile, engine=engine, columns=data.keys())
124118

125119
tm.assert_equal(expected, got)
126120

@@ -149,7 +143,7 @@ def test_orc_reader_decimal(dirpath, engine):
149143
expected = pd.DataFrame.from_dict(data)
150144

151145
inputfile = os.path.join(dirpath, "TestOrcFile.decimal.orc")
152-
got = pd.read_orc(inputfile, engine=engine).iloc[:10]
146+
got = read_orc(inputfile, engine=engine).iloc[:10]
153147

154148
tm.assert_equal(expected, got)
155149

@@ -190,7 +184,7 @@ def test_orc_reader_date_low(dirpath, engine):
190184
expected = pd.DataFrame.from_dict(data)
191185

192186
inputfile = os.path.join(dirpath, "TestOrcFile.testDate1900.orc")
193-
got = pd.read_orc(inputfile, engine=engine).iloc[:10]
187+
got = read_orc(inputfile, engine=engine).iloc[:10]
194188

195189
tm.assert_equal(expected, got)
196190

@@ -231,7 +225,7 @@ def test_orc_reader_date_high(dirpath, engine):
231225
expected = pd.DataFrame.from_dict(data)
232226

233227
inputfile = os.path.join(dirpath, "TestOrcFile.testDate2038.orc")
234-
got = pd.read_orc(inputfile, engine=engine).iloc[:10]
228+
got = read_orc(inputfile, engine=engine).iloc[:10]
235229

236230
tm.assert_equal(expected, got)
237231

@@ -272,6 +266,6 @@ def test_orc_reader_snappy_compressed(dirpath, engine):
272266
expected = pd.DataFrame.from_dict(data)
273267

274268
inputfile = os.path.join(dirpath, "TestOrcFile.testSnappy.orc")
275-
got = pd.read_orc(inputfile, engine=engine).iloc[:10]
269+
got = read_orc(inputfile, engine=engine).iloc[:10]
276270

277271
tm.assert_equal(expected, got)

0 commit comments

Comments
 (0)