Skip to content

Commit b9deac4

Browse files
committed
correction for Linthub (code style)
1 parent fb8e9a6 commit b9deac4

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

matplotlib2tikz/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def draw_image(data, obj):
2929

3030
if obj.origin == "lower":
3131
img_array = numpy.flipud(img_array)
32-
32+
3333
dims = img_array.shape
3434
if len(dims) == 2: # the values are given as one real number: look at cmap
3535
clims = obj.get_clim()

matplotlib2tikz/save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_tikz_code(
3030
extra_tikzpicture_parameters=None,
3131
dpi=None,
3232
show_info=True
33-
):
33+
):
3434
'''Main function. Here, the recursion into the image starts and the
3535
contents are picked up. The actual file gets written in this routine.
3636

test/test_image_plot.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
except ImportError:
1212
raise RuntimeError('PIL must be installed to run this example')
1313

14-
#the picture 'lena.png' with origin='lower' is flipped upside-down. So it has to be upside-down in the pdf-file as well.
14+
# the picture 'lena.png' with origin='lower' is flipped upside-down.
15+
# So it has to be upside-down in the pdf-file as well.
1516

16-
def plot1(): #test for monochrome picture
17+
# test for monochrome picture
18+
def plot1():
1719

1820
this_dir = os.path.dirname(os.path.realpath(__file__))
1921
lena = Image.open(os.path.join(this_dir, 'lena.png'))
@@ -29,7 +31,9 @@ def plot1(): #test for monochrome picture
2931
pp.colorbar()
3032
return fig
3133

32-
def plot2(): #test for rgb picture
34+
35+
# test for rgb picture
36+
def plot2():
3337

3438
this_dir = os.path.dirname(os.path.realpath(__file__))
3539
lena = Image.open(os.path.join(this_dir, 'lena.png'))
@@ -44,14 +48,13 @@ def plot2(): #test for rgb picture
4448
pp.colorbar()
4549
return fig
4650

51+
4752
@pytest.mark.parametrize(
4853
'plot, phash', [
4954
(plot1, '455361ec211d72fb'),
5055
(plot2, '7558d3b30f634b06'),
5156
]
5257
)
53-
5458
def test(plot, phash):
5559
helpers.assert_phash(plot(), phash)
56-
return
57-
60+
return

0 commit comments

Comments
 (0)