Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Schaefer committed May 18, 2020
1 parent e970d97 commit 08f1588
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 3 additions & 5 deletions pandapower/auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@
from .pf.no_numba import jit

try:
from lightsim2grid.newtonpf import newtonpf

lightsim2grid_available = True
from lightsim2grid.newtonpf import newtonpf as newtonpf_ls
except ImportError:
lightsim2grid_available = False

newtonpf_ls = None
try:
import pplog as logging
except ImportError:
import logging

lightsim2grid_available = True if newtonpf_ls is not None else False
logger = logging.getLogger(__name__)


Expand Down
4 changes: 0 additions & 4 deletions pandapower/plotting/patch_makers.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ def storage_patches(node_coords, size, angles, **kwargs):
r_triangle = kwargs.get("r_triangles", size * 0.4)
edgecolor = kwargs.get("patch_edgecolor", "w")
facecolor = kwargs.get("patch_facecolor", "w")
edgecolors = get_color_list(edgecolor, len(node_coords))
facecolors = get_color_list(facecolor, len(node_coords))
all_angles = get_angle_list(angles, len(node_coords))
for i, node_geo in enumerate(node_coords):
mid_circ = node_geo + _rotate_dim2(np.array([0, offset + r_triangle * 2.]), angles[i])
Expand All @@ -300,8 +298,6 @@ def storage_patches(node_coords, size, angles, **kwargs):
perp_foot2 = mid_tri1 + _rotate_dim2(np.array([0, -r_triangle]), angles[i])
line_end2 = perp_foot2 + _rotate_dim2(np.array([2. * r_triangle, 0]), angles[i])

p2 = node_geo + _rotate_dim2(np.array([0, offset]), all_angles[i])

lines.append((node_geo, circ_edge))
lines.append((perp_foot1, line_end1))
lines.append((perp_foot2, line_end2))
Expand Down

0 comments on commit 08f1588

Please sign in to comment.