Skip to content

Commit 235fdd6

Browse files
fixed flake8 E231 errors
1 parent 184b71c commit 235fdd6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/test_cleanfigure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def test_opheimSimplify():
377377
tol = 0.02
378378
mask = cleanfigure._opheimSimplify(x, y, tol)
379379
assert mask.shape == (12,)
380-
assert np.allclose(mask * 1, np.array([1,] + [0,] * 10 + [1,]))
380+
assert np.allclose(mask * 1, np.array([1] + [0] * 10 + [1]))
381381

382382

383383
@pytest.mark.parametrize(
@@ -947,11 +947,11 @@ def test_segmentVisible():
947947
y = np.linspace(1, 100, 20)
948948
x = y.copy()
949949
data = np.stack([x, y], axis=1)
950-
dataIsInBox = np.array([0,] * 4 + [1,] * 12 + [0,] * 4) == 1
950+
dataIsInBox = np.array([0] * 4 + [1] * 12 + [0] * 4) == 1
951951
xLim = np.array([20, 80])
952952
yLim = np.array([20, 80])
953953
mask = cleanfigure._segmentVisible(data, dataIsInBox, xLim, yLim)
954-
assert np.allclose(mask * 1, np.array([0,] * 3 + [1,] * 13 + [0,] * 3))
954+
assert np.allclose(mask * 1, np.array([0] * 3 + [1] * 13 + [0] * 3))
955955

956956

957957
def test_crossLines():

tikzplotlib/cleanfigure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def _removeNaNs(linehandle):
376376
else:
377377
id_remove = id_remove[
378378
np.concatenate(
379-
[_diff(id_remove, axis=0) == 1, np.array([False,]).reshape((-1,))]
379+
[_diff(id_remove, axis=0) == 1, np.array([False]).reshape((-1,))]
380380
)
381381
]
382382

@@ -545,7 +545,7 @@ def _pruneOutsideBox(fighandle, axhandle, linehandle):
545545
# diff(id_remove)==1, so replace diff(id_remove)>1 by NaN and remove
546546
# the rest
547547
idx = np.diff(id_remove, axis=0) > 1
548-
idx = np.concatenate([np.array([True,]).reshape((-1, 1)), idx], axis=0)
548+
idx = np.concatenate([np.array([True]).reshape((-1, 1)), idx], axis=0)
549549

550550
id_replace = id_remove[idx]
551551
id_remove = id_remove[np.logical_not(idx)]

0 commit comments

Comments
 (0)