Skip to content

Commit

Permalink
Fix bug in disjoint_nets method due to a regression in the net_name s…
Browse files Browse the repository at this point in the history
…etter
  • Loading branch information
maxcapodi78 authored and maxcapodi78 committed Nov 22, 2023
1 parent f65673c commit 629705e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyaedt/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ def _create_cutout_multithread(
elif custom_extent:
_poly = custom_extent
else:
net_signals = [net.api_object for net in self.layout.nets if net.name in signal_list]
net_signals = [net.api_object for net in self.layout.nets if net.name in signal_list + nets_to_preserve]
_poly = self._create_extent(
net_signals,
extent_type,
Expand Down
2 changes: 2 additions & 0 deletions pyaedt/edb_core/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,7 @@ def create_pingroup_from_pins(self, pins, group_name=None):
def delete_single_pin_rlc(self, deactivate_only=False):
# type: (bool) -> list
"""Delete all RLC components with a single pin.
Single pin component model type will be reverted to ``"RLC"``.
Parameters
----------
Expand Down Expand Up @@ -1688,6 +1689,7 @@ def delete_single_pin_rlc(self, deactivate_only=False):
if val.numpins < 2 and val.type in ["Resistor", "Capacitor", "Inductor"]:
if deactivate_only:
val.is_enabled = False
val.model_type = "RLC"

Check warning on line 1692 in pyaedt/edb_core/components.py

View check run for this annotation

Codecov / codecov/patch

pyaedt/edb_core/components.py#L1692

Added line #L1692 was not covered by tests
else:
val.edbcomponent.Delete()
deleted_comps.append(comp)
Expand Down
2 changes: 1 addition & 1 deletion pyaedt/edb_core/edb_data/primitives_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def net_name(self, name):
self.net = name

Check warning on line 106 in pyaedt/edb_core/edb_data/primitives_data.py

View check run for this annotation

Codecov / codecov/patch

pyaedt/edb_core/edb_data/primitives_data.py#L106

Added line #L106 was not covered by tests
elif isinstance(name, NetDotNet):
self.net = name.name
except:
except: # pragma: no cover
self._app.logger.error("Failed to set net name.")

@property
Expand Down

0 comments on commit 629705e

Please sign in to comment.