Skip to content

Commit d3105dc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 10a860e commit d3105dc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

splinepy/io/svg.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ def _export_spline_field(spline, svg_element, box_min_x, box_max_y, **kwargs):
196196
showable = sampled_spline.showable()
197197

198198
# Discretize colors
199-
if kwargs.get("n_colors", None) is not None:
200-
n_colors = kwargs.get("n_colors", None)
199+
if kwargs.get("n_colors") is not None:
200+
n_colors = kwargs.get("n_colors")
201201
cmap_key = spline.show_options.get("cmap", "jet")
202202
vmin = kwargs.get("vmin", spline.show_options.get("vmin", None))
203203
vmax = kwargs.get("vmax", spline.show_options.get("vmax", None))
@@ -307,7 +307,7 @@ def _export_gustaf_object(
307307
)
308308

309309
# Set text options
310-
if kwargs.get("font_family", None) is not None:
310+
if kwargs.get("font_family") is not None:
311311
svg_labels.attrib["font-family"] = kwargs["font_family"]
312312

313313
svg_labels.attrib["font-size"] = str(kwargs.get("font_size", 0.1))
@@ -479,7 +479,7 @@ def _export_control_mesh(
479479
)
480480

481481
# Set text options
482-
if kwargs.get("font_family", None) is not None:
482+
if kwargs.get("font_family") is not None:
483483
svg_control_point_ids.attrib["font-family"] = kwargs["font_family"]
484484
svg_control_point_ids.attrib["font-size"] = str(
485485
kwargs.get("font_size", 0.1)
@@ -746,7 +746,7 @@ def _add_scalar_bar(svg_element, box_size, **kwargs):
746746
)
747747

748748
# Set text options
749-
if kwargs.get("font_family", None) is not None:
749+
if kwargs.get("font_family") is not None:
750750
svg_tick_labels.attrib["font-family"] = kwargs["font_family"]
751751
svg_tick_labels.attrib["font-size"] = str(
752752
kwargs.get("scalarbar_font_size", stroke_width * 20)
@@ -1305,8 +1305,8 @@ def export(
13051305
scalarbar_offset = kwargs["scalarbar_offset"]
13061306
# Check if required arguments have been passed
13071307
if scalarbar and (
1308-
(kwargs.get("vmin", None) is None)
1309-
or (kwargs.get("vmax", None) is None)
1308+
(kwargs.get("vmin") is None)
1309+
or (kwargs.get("vmax") is None)
13101310
):
13111311
raise ValueError(
13121312
"`vmin` and `vmax` must be passed alon with scalarbar to ensure"

0 commit comments

Comments
 (0)