Skip to content

Commit 184b71c

Browse files
flake8 fixes
1 parent db21722 commit 184b71c

File tree

2 files changed

+197
-206
lines changed

2 files changed

+197
-206
lines changed

test/test_cleanfigure.py

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_recursive_cleanfigure():
2323
def test_pruneOutsideBox():
2424
"""test against matlab2tikz implementation
2525
26-
octave code to generate baseline results.
26+
octave code to generate baseline results.
2727
Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
2828
```octave
2929
x = linspace(1, 100, 20);
@@ -53,7 +53,7 @@ def test_pruneOutsideBox():
5353
def test_replaceDataWithNaN():
5454
"""test against matlab2tikz implementation.
5555
56-
octave code to generate baseline results.
56+
octave code to generate baseline results.
5757
Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
5858
```octave
5959
x = linspace(1, 100, 20);
@@ -87,7 +87,7 @@ def test_replaceDataWithNaN():
8787
def test_removeData():
8888
"""test against matlab2tikz implementation.
8989
90-
octave code to generate baseline results.
90+
octave code to generate baseline results.
9191
Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
9292
```octave
9393
x = linspace(1, 100, 20);
@@ -117,20 +117,18 @@ def test_removeData():
117117

118118
def test_removeNaNs():
119119
"""test against matlab2tikz implementation
120-
120+
121121
octave code to generate baseline results. Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
122122
```octave
123123
x = linspace(1, 100, 20);
124124
y1 = linspace(1, 100, 20);
125-
125+
126126
figure
127127
plot(x, y1)
128128
xlim([20, 80])
129129
ylim([20, 80])
130130
cleanfigure;
131131
```
132-
133-
134132
"""
135133
id_replace = np.array([0, 16])
136134
id_remove = np.array([1, 2, 3, 17, 18, 19])
@@ -150,8 +148,7 @@ def test_removeNaNs():
150148

151149
def test_isInBox():
152150
"""octave code to generate baseline results
153-
154-
151+
155152
```octave
156153
x = 1:10;
157154
y = 1:10;
@@ -160,8 +157,6 @@ def test_isInBox():
160157
ylim = [3, 7];
161158
mask = isInBox(data, xlim, ylim)
162159
```
163-
164-
165160
"""
166161
x = np.linspace(1, 100, 20)
167162
y = np.linspace(1, 100, 20)
@@ -191,8 +186,6 @@ def test_getVisualLimits():
191186
set(gcf,'Position',[2.5 2.5 5 5])
192187
cleanfigure;
193188
```
194-
195-
196189
"""
197190
x = np.linspace(1, 100, 20)
198191
y = np.linspace(1, 100, 20)
@@ -243,10 +236,10 @@ def test_simplifyLine():
243236
"""octave code
244237
```octave
245238
addpath ("../matlab2tikz/src")
246-
239+
247240
x = linspace(1, 100, 20);
248241
y1 = linspace(1, 100, 20);
249-
242+
250243
figure
251244
plot(x, y1)
252245
xlim([20, 80])
@@ -312,10 +305,10 @@ def test_limitPrecision():
312305
"""octave code
313306
```octave
314307
addpath ("../matlab2tikz/src")
315-
308+
316309
x = linspace(1, 100, 20);
317310
y1 = linspace(1, 100, 20);
318-
311+
319312
figure
320313
plot(x, y1)
321314
xlim([20, 80])
@@ -345,14 +338,14 @@ def test_limitPrecision():
345338

346339
def test_opheimSimplify():
347340
"""test path simplification
348-
341+
349342
octave code
350343
```octave
351344
addpath ("../matlab2tikz/src")
352-
345+
353346
x = linspace(1, 100, 20);
354347
y1 = linspace(1, 100, 20);
355-
348+
356349
figure
357350
plot(x, y1)
358351
xlim([20, 80])
@@ -393,8 +386,8 @@ def test_opheimSimplify():
393386
def test_is_step(function, result):
394387
"""
395388
396-
:param function:
397-
:param result:
389+
:param function:
390+
:param result:
398391
399392
"""
400393
x = np.linspace(1, 100, 20)
@@ -581,10 +574,10 @@ def test_surface3D(self):
581574
with pytest.warns(Warning):
582575
cleanfigure.cleanfigure(fig)
583576

584-
def test_trisurface3D(Self):
577+
def test_trisurface3D(self):
585578
"""
586579
587-
:param Self:
580+
:param Self:
588581
589582
"""
590583
import matplotlib.pyplot as plt
@@ -643,7 +636,7 @@ def test_polygon3D(self):
643636
def cc(arg):
644637
"""
645638
646-
:param arg:
639+
:param arg:
647640
648641
"""
649642
return mcolors.to_rgba(arg, alpha=0.6)
@@ -883,13 +876,13 @@ class Test_subplots:
883876

884877
def test_subplot(self):
885878
"""octave code
886-
879+
887880
```octave
888881
addpath ("../matlab2tikz/src")
889-
882+
890883
x = linspace(1, 100, 20);
891884
y1 = linspace(1, 100, 20);
892-
885+
893886
figure
894887
subplot(2, 2, 1)
895888
plot(x, y1, "-")
@@ -935,12 +928,12 @@ def test_subplot(self):
935928

936929
def test_segmentVisible():
937930
"""test against matlab2tikz implementation
938-
931+
939932
octave code to generate baseline results. Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
940933
```octave
941934
x = linspace(1, 100, 20);
942935
y1 = linspace(1, 100, 20);
943-
936+
944937
figure
945938
plot(x, y1)
946939
xlim([20, 80])

0 commit comments

Comments
 (0)