Skip to content

Commit ec26198

Browse files
fix noqa comments
1 parent d9a2b4b commit ec26198

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

pandas/api/extensions/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
)
66

77
from pandas.core.accessor import ( # noqa: F401
8+
register_dataframe_accessor,
89
register_index_accessor,
910
register_series_accessor,
1011
)
1112
from pandas.core.algorithms import take # noqa: F401
1213
from pandas.core.arrays import ExtensionArray, ExtensionScalarOpsMixin # noqa: F401
13-
14-
from pandas.core.accessor import register_dataframe_accessor # noqa: F401; noqa: F401

pandas/tests/arrays/categorical/test_constructors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ def test_constructor(self):
224224

225225
# this is a legitimate constructor
226226
with tm.assert_produces_warning(None):
227-
c = Categorical(
228-
np.array([], dtype="int64"), categories=[3, 2, 1], ordered=True # noqa
227+
c = Categorical( # noqa
228+
np.array([], dtype="int64"), categories=[3, 2, 1], ordered=True
229229
)
230230

231231
def test_constructor_with_existing_categories(self):

pandas/tests/frame/test_alter_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,8 @@ def test_set_index_pass_arrays_duplicate(
238238
# cannot drop the same column twice;
239239
# use "is" because == would give ambiguous Boolean error for containers
240240
first_drop = (
241-
False if (keys[0] is "A" and keys[1] is "A") else drop
242-
) # noqa: F632
243-
241+
False if (keys[0] is "A" and keys[1] is "A") else drop # noqa: F632
242+
)
244243
# to test against already-tested behaviour, we add sequentially,
245244
# hence second append always True; must wrap keys in list, otherwise
246245
# box = list would be interpreted as keys

pandas/tests/frame/test_analytics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,8 +2135,8 @@ def test_round(self):
21352135
nan_round_Series = Series({"col1": np.nan, "col2": 1})
21362136

21372137
# TODO(wesm): unused?
2138-
expected_nan_round = DataFrame(
2139-
{"col1": [1.123, 2.123, 3.123], "col2": [1.2, 2.2, 3.2]} # noqa
2138+
expected_nan_round = DataFrame( # noqa
2139+
{"col1": [1.123, 2.123, 3.123], "col2": [1.2, 2.2, 3.2]}
21402140
)
21412141

21422142
with pytest.raises(TypeError):

pandas/tests/frame/test_query_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def test_ops(self):
102102
("/", "__truediv__", "__rtruediv__"),
103103
]:
104104

105-
base = DataFrame(
106-
np.tile(m.values, n).reshape(n, -1), columns=list("abcd") # noqa
105+
base = DataFrame( # noqa
106+
np.tile(m.values, n).reshape(n, -1), columns=list("abcd")
107107
)
108108

109109
expected = eval("base{op}df".format(op=op_str))

pandas/tests/test_strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,13 +1839,13 @@ def test_ismethods(self):
18391839
digit_e = [False, False, False, True, False, False, False, True, False, False]
18401840

18411841
# TODO: unused
1842-
num_e = [
1842+
num_e = [ # noqa
18431843
False,
18441844
False,
18451845
False,
18461846
True,
18471847
False,
1848-
False, # noqa
1848+
False,
18491849
False,
18501850
True,
18511851
False,

0 commit comments

Comments
 (0)