Skip to content

Commit 8f0b708

Browse files
committed
make format
1 parent c7129c3 commit 8f0b708

File tree

8 files changed

+3
-23
lines changed

8 files changed

+3
-23
lines changed

test/helpers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def print_tree(obj, indent=""):
1818

1919
for child in obj.get_children():
2020
print_tree(child, indent + " ")
21-
return
2221

2322

2423
# https://stackoverflow.com/a/845432/353337
@@ -47,7 +46,6 @@ def assert_equality(plot, filename, **extra_get_tikz_code_args):
4746
include_disclaimer=False, standalone=True, **extra_get_tikz_code_args
4847
)
4948
assert _compile(code) is not None
50-
return
5149

5250

5351
def _compile(code):
@@ -96,4 +94,3 @@ def compare_mpl_latex(plot):
9694
png_path = os.path.join(pdf_dirname, "test-1.png")
9795

9896
os.rename(png_path, os.path.join(directory, "test-1.png"))
99-
return

test/test_basic_sin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def plot():
2424

2525
def test():
2626
assert_equality(plot, "test_basic_sin_reference.tex")
27-
return
2827

2928

3029
if __name__ == "__main__":

test/test_errorband.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def plot():
2121

2222
def test():
2323
assert_equality(plot, "test_errorband_reference.tex")
24-
return
2524

2625

2726
if __name__ == "__main__":

test/test_errorbar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ def plot():
1818

1919
def test():
2020
assert_equality(plot, "test_errorbar_reference.tex")
21-
return

tikzplotlib/_axes.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ def __init__(self, data, obj): # noqa: C901
150150
else:
151151
self.content.append("\\begin{axis}")
152152

153-
return
154-
155153
def get_begin_code(self):
156154
content = self.content
157155
if self.axis_options:
@@ -201,7 +199,6 @@ def _set_axis_dimensions(self, data, aspect_num, xlim, ylim):
201199
else:
202200
# TODO keep an eye on https://tex.stackexchange.com/q/480058/13262
203201
pass
204-
return
205202

206203
def _ticks(self, data, obj):
207204
# get ticks
@@ -291,8 +288,6 @@ def _ticks(self, data, obj):
291288
self.axis_options.append(x_tick_position_string)
292289
self.axis_options.append(y_tick_position_string)
293290

294-
return
295-
296291
def _grid(self, obj, data):
297292
# Don't use get_{x,y}gridlines for gridlines; see discussion on
298293
# <http://sourceforge.net/p/matplotlib/mailman/message/25169234/> Coordinate of
@@ -321,8 +316,6 @@ def _grid(self, obj, data):
321316
if col != "black":
322317
self.axis_options.append(f"y grid style={{{col}}}")
323318

324-
return
325-
326319
def _colorbar(self, colorbar, data):
327320
colorbar_styles = []
328321

@@ -408,8 +401,6 @@ def _colorbar(self, colorbar, data):
408401
"colorbar style={{{}}}".format(",".join(colorbar_styles))
409402
)
410403

411-
return
412-
413404
def _subplot(self, obj, data):
414405
# https://github.com/matplotlib/matplotlib/issues/7225#issuecomment-252173667
415406
geom = obj.get_subplotspec().get_topmost_subplotspec().get_geometry()
@@ -431,8 +422,6 @@ def _subplot(self, obj, data):
431422
data["is_in_groupplot_env"] = True
432423
data["pgfplots libs"].add("groupplots")
433424

434-
return
435-
436425
def _get_label_rotation_and_horizontal_alignment(self, obj, data, x_or_y):
437426
tick_label_text_width = None
438427
tick_label_text_width_identifier = f"{x_or_y} tick label text width"

tikzplotlib/_hatches.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import warnings
1919

20-
2120
BAD_MP_HATCH = ["o", "O"] # Bad hatch/pattern correspondance
2221
UNUSED_PGF_PATTERN = ["dots"]
2322
_MP_HATCH2PGF_PATTERN = {

tikzplotlib/_legend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ def draw_legend(data, obj):
7979
break
8080

8181
if alignment:
82-
data["current axes"].axis_options.append(
83-
f"legend cell align={{{alignment}}}"
84-
)
82+
data["current axes"].axis_options.append(f"legend cell align={{{alignment}}}")
8583

8684
if obj._ncol != 1:
8785
data["current axes"].axis_options.append(f"legend columns={obj._ncol}")

tikzplotlib/_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import matplotlib as mpl
22
import numpy
3+
from matplotlib.dates import DateConverter, num2date
34
from matplotlib.markers import MarkerStyle
4-
from matplotlib.dates import num2date, DateConverter
55

66
from . import _color
77
from ._axes import _mpl_cmap2pgf_cmap
8+
from ._hatches import _mpl_hatch2pgfp_pattern
89
from ._markers import _mpl_marker2pgfp_marker
910
from ._util import get_legend_text, has_legend
10-
from ._hatches import _mpl_hatch2pgfp_pattern
1111

1212

1313
def draw_path(data, path, draw_options=None, simplify=None):

0 commit comments

Comments
 (0)