Skip to content

Commit 89f9547

Browse files
fix noqa comments
1 parent d29415f commit 89f9547

File tree

8 files changed

+16
-17
lines changed

8 files changed

+16
-17
lines changed

pandas/api/extensions/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Public API for extending pandas objects."""
2-
from pandas.core.accessor import (
3-
register_dataframe_accessor, # noqa
2+
from pandas.core.accessor import ( # noqa
3+
register_dataframe_accessor,
44
register_index_accessor,
55
register_series_accessor,
66
)

pandas/api/types/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
""" public toolkit API """
22

33
from pandas.core.dtypes.api import * # noqa
4-
from pandas.core.dtypes.dtypes import (
5-
CategoricalDtype, # noqa
4+
from pandas.core.dtypes.dtypes import ( # noqa
5+
CategoricalDtype,
66
DatetimeTZDtype,
77
PeriodDtype,
88
IntervalDtype,

pandas/tests/arrays/categorical/test_constructors.py

+2-2
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/extension/base/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class TestMyDtype(BaseDtypeTests):
4949
from .methods import BaseMethodsTests # noqa
5050
from .ops import BaseArithmeticOpsTests, BaseComparisonOpsTests, BaseOpsUtil # noqa
5151
from .printing import BasePrintingTests # noqa
52-
from .reduce import (
52+
from .reduce import ( # noqa
5353
BaseNoReduceTests,
5454
BaseNumericReduceTests,
5555
BaseBooleanReduceTests,
56-
) # noqa
56+
)
5757
from .missing import BaseMissingTests # noqa
5858
from .reshaping import BaseReshapingTests # noqa
5959
from .setitem import BaseSetitemTests # noqa

pandas/tests/frame/test_alter_axes.py

+2-3
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -2116,8 +2116,8 @@ def test_round(self):
21162116
nan_round_Series = Series({"col1": np.nan, "col2": 1})
21172117

21182118
# TODO(wesm): unused?
2119-
expected_nan_round = DataFrame(
2120-
{"col1": [1.123, 2.123, 3.123], "col2": [1.2, 2.2, 3.2]} # noqa
2119+
expected_nan_round = DataFrame( # noqa
2120+
{"col1": [1.123, 2.123, 3.123], "col2": [1.2, 2.2, 3.2]}
21212121
)
21222122

21232123
with pytest.raises(TypeError):

pandas/tests/frame/test_query_eval.py

+2-2
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

+2-2
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)