pyedb 0.53.0__py3-none-any.whl → 0.54.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

Files changed (84) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_ports_sources.py +6 -8
  3. pyedb/configuration/configuration.py +2 -1
  4. pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
  5. pyedb/dotnet/database/cell/layout.py +1 -1
  6. pyedb/dotnet/database/cell/layout_obj.py +3 -3
  7. pyedb/dotnet/database/cell/primitive/path.py +1 -1
  8. pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
  9. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  10. pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
  11. pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
  12. pyedb/dotnet/database/components.py +24 -24
  13. pyedb/dotnet/database/definition/component_def.py +3 -3
  14. pyedb/dotnet/database/definition/component_model.py +1 -1
  15. pyedb/dotnet/database/definition/package_def.py +1 -1
  16. pyedb/dotnet/database/dotnet/database.py +43 -38
  17. pyedb/dotnet/database/dotnet/primitive.py +16 -16
  18. pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
  19. pyedb/dotnet/database/edb_data/layer_data.py +14 -14
  20. pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
  21. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  22. pyedb/dotnet/database/edb_data/sources.py +6 -6
  23. pyedb/dotnet/database/edb_data/variables.py +7 -3
  24. pyedb/dotnet/database/geometry/point_data.py +1 -1
  25. pyedb/dotnet/database/geometry/polygon_data.py +2 -4
  26. pyedb/dotnet/database/hfss.py +7 -7
  27. pyedb/dotnet/database/materials.py +2 -2
  28. pyedb/dotnet/database/modeler.py +8 -11
  29. pyedb/dotnet/database/nets.py +1 -1
  30. pyedb/dotnet/database/padstack.py +72 -1
  31. pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
  32. pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
  33. pyedb/dotnet/database/siwave.py +5 -5
  34. pyedb/dotnet/database/stackup.py +74 -77
  35. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  36. pyedb/dotnet/database/utilities/obj_base.py +1 -1
  37. pyedb/dotnet/database/utilities/value.py +116 -0
  38. pyedb/dotnet/edb.py +43 -43
  39. pyedb/generic/design_types.py +12 -3
  40. pyedb/grpc/__init__.py +0 -0
  41. pyedb/grpc/database/components.py +53 -17
  42. pyedb/grpc/database/definition/materials.py +23 -30
  43. pyedb/grpc/database/definition/package_def.py +15 -15
  44. pyedb/grpc/database/definition/padstack_def.py +51 -51
  45. pyedb/grpc/database/geometry/arc_data.py +7 -5
  46. pyedb/grpc/database/geometry/point_3d_data.py +8 -7
  47. pyedb/grpc/database/geometry/polygon_data.py +3 -2
  48. pyedb/grpc/database/hierarchy/component.py +43 -38
  49. pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
  50. pyedb/grpc/database/hierarchy/pingroup.py +9 -9
  51. pyedb/grpc/database/layers/stackup_layer.py +45 -44
  52. pyedb/grpc/database/layout/layout.py +9 -8
  53. pyedb/grpc/database/layout/voltage_regulator.py +7 -7
  54. pyedb/grpc/database/layout_validation.py +13 -12
  55. pyedb/grpc/database/modeler.py +51 -54
  56. pyedb/grpc/database/nets.py +42 -31
  57. pyedb/grpc/database/padstacks.py +270 -175
  58. pyedb/grpc/database/ports/ports.py +5 -6
  59. pyedb/grpc/database/primitive/bondwire.py +8 -7
  60. pyedb/grpc/database/primitive/circle.py +4 -4
  61. pyedb/grpc/database/primitive/padstack_instance.py +18 -18
  62. pyedb/grpc/database/primitive/path.py +7 -7
  63. pyedb/grpc/database/primitive/polygon.py +3 -3
  64. pyedb/grpc/database/primitive/primitive.py +13 -17
  65. pyedb/grpc/database/primitive/rectangle.py +13 -13
  66. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  67. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
  68. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
  69. pyedb/grpc/database/siwave.py +30 -24
  70. pyedb/grpc/database/source_excitations.py +333 -229
  71. pyedb/grpc/database/stackup.py +164 -147
  72. pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
  73. pyedb/grpc/database/terminal/edge_terminal.py +10 -0
  74. pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
  75. pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
  76. pyedb/grpc/database/terminal/point_terminal.py +4 -3
  77. pyedb/grpc/database/terminal/terminal.py +9 -9
  78. pyedb/grpc/database/utility/value.py +109 -0
  79. pyedb/grpc/edb.py +59 -38
  80. pyedb/grpc/edb_init.py +0 -7
  81. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +3 -3
  82. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +84 -81
  83. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +0 -0
  84. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/licenses/LICENSE +0 -0
@@ -40,7 +40,6 @@ from ansys.edb.core.primitive.path import PathEndCapType as GrpcPathEndCapType
40
40
  from ansys.edb.core.primitive.rectangle import (
41
41
  RectangleRepresentationType as GrpcRectangleRepresentationType,
42
42
  )
43
- from ansys.edb.core.utility.value import Value as GrpcValue
44
43
 
45
44
  from pyedb.grpc.database.primitive.bondwire import Bondwire
46
45
  from pyedb.grpc.database.primitive.circle import Circle
@@ -49,6 +48,7 @@ from pyedb.grpc.database.primitive.polygon import Polygon
49
48
  from pyedb.grpc.database.primitive.primitive import Primitive
50
49
  from pyedb.grpc.database.primitive.rectangle import Rectangle
51
50
  from pyedb.grpc.database.utility.layout_statistics import LayoutStatistics
51
+ from pyedb.grpc.database.utility.value import Value
52
52
 
53
53
 
54
54
  class Modeler(object):
@@ -219,7 +219,7 @@ class Modeler(object):
219
219
  list
220
220
  List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive` objects.
221
221
  """
222
- return [self.__mapping_primitive_type(prim) for prim in self._pedb.layout.primitives]
222
+ return self._pedb.layout.primitives
223
223
 
224
224
  @property
225
225
  def polygons_by_layer(self) -> Dict[str, List[Primitive]]:
@@ -425,12 +425,7 @@ class Modeler(object):
425
425
  Bounding box coordinates [min_x, min_y, max_x, max_y].
426
426
  """
427
427
  bounding_box = polygon.polygon_data.bbox()
428
- return [
429
- bounding_box[0].x.value,
430
- bounding_box[0].y.value,
431
- bounding_box[1].x.value,
432
- bounding_box[1].y.value,
433
- ]
428
+ return [Value(bounding_box[0].x), Value(bounding_box[0].y), Value(bounding_box[1].x), Value(bounding_box[1].y)]
434
429
 
435
430
  @staticmethod
436
431
  def get_polygon_points(polygon) -> List[List[float]]:
@@ -455,9 +450,9 @@ class Modeler(object):
455
450
  point = polygon.polygon_data.points[i]
456
451
  if prev_point != point:
457
452
  if point.is_arc:
458
- points.append([point.x.value])
453
+ points.append([Value(point.x)])
459
454
  else:
460
- points.append([point.x.value, point.y.value])
455
+ points.append([Value(point.x), Value(point.y)])
461
456
  prev_point = point
462
457
  i += 1
463
458
  else:
@@ -513,8 +508,8 @@ class Modeler(object):
513
508
  polygon_data = polygon.polygon_data
514
509
  bound_center = polygon_data.bounding_circle()[0]
515
510
  bound_center2 = selection_polygon_data.bounding_circle()[0]
516
- center = [bound_center.x.value, bound_center.y.value]
517
- center2 = [bound_center2.x.value, bound_center2.y.value]
511
+ center = [Value(bound_center.x), Value(bound_center.y)]
512
+ center2 = [Value(bound_center2.x), Value(bound_center2.y)]
518
513
  x1, y1 = calc_slope(center2, center)
519
514
 
520
515
  if not origin:
@@ -529,12 +524,12 @@ class Modeler(object):
529
524
  if prev_point != point:
530
525
  check_inside = selection_polygon_data.is_inside(point)
531
526
  if check_inside:
532
- xcoeff, ycoeff = calc_slope([point.x.value, point.x.value], origin)
527
+ xcoeff, ycoeff = calc_slope([Value(point.x), Value(point.x)], origin)
533
528
 
534
529
  new_points = GrpcPointData(
535
530
  [
536
- GrpcValue(str(point.x.value) + f"{xcoeff}*{offset_name}"),
537
- GrpcValue(str(point.y.value) + f"{ycoeff}*{offset_name}"),
531
+ Value(str(Value(point.x) + f"{xcoeff}*{offset_name}")),
532
+ Value(str(Value(point.y)) + f"{ycoeff}*{offset_name}"),
538
533
  ]
539
534
  )
540
535
  polygon_data.points[i] = new_points
@@ -610,12 +605,12 @@ class Modeler(object):
610
605
  for pt in points:
611
606
  _pt = []
612
607
  for coord in pt:
613
- coord = GrpcValue(coord, self._pedb.active_cell)
608
+ coord = Value(coord, self._pedb.active_cell)
614
609
  _pt.append(coord)
615
610
  _points.append(_pt)
616
611
  points = _points
617
612
 
618
- width = GrpcValue(width, self._pedb.active_cell)
613
+ width = Value(width, self._pedb.active_cell)
619
614
 
620
615
  polygon_data = GrpcPolygonData(points=[GrpcPointData(i) for i in points])
621
616
  path = Path.create(
@@ -710,7 +705,7 @@ class Modeler(object):
710
705
  new_points = []
711
706
  for idx, i in enumerate(points):
712
707
  new_points.append(
713
- GrpcPointData([GrpcValue(i[0], self._pedb.active_cell), GrpcValue(i[1], self._pedb.active_cell)])
708
+ GrpcPointData([Value(i[0], self._pedb.active_cell), Value(i[1], self._pedb.active_cell)])
714
709
  )
715
710
  polygon_data = GrpcPolygonData(points=new_points)
716
711
 
@@ -787,40 +782,40 @@ class Modeler(object):
787
782
  layer=layer_name,
788
783
  net=edb_net,
789
784
  rep_type=rep_type,
790
- param1=GrpcValue(lower_left_point[0]),
791
- param2=GrpcValue(lower_left_point[1]),
792
- param3=GrpcValue(upper_right_point[0]),
793
- param4=GrpcValue(upper_right_point[1]),
794
- corner_rad=GrpcValue(corner_radius),
795
- rotation=GrpcValue(rotation),
785
+ param1=Value(lower_left_point[0]),
786
+ param2=Value(lower_left_point[1]),
787
+ param3=Value(upper_right_point[0]),
788
+ param4=Value(upper_right_point[1]),
789
+ corner_rad=Value(corner_radius),
790
+ rotation=Value(rotation),
796
791
  )
797
792
  else:
798
793
  rep_type = GrpcRectangleRepresentationType.CENTER_WIDTH_HEIGHT
799
794
  if isinstance(width, str):
800
795
  if width in self._pedb.variables:
801
- width = GrpcValue(width, self._pedb.active_cell)
796
+ width = Value(width, self._pedb.active_cell)
802
797
  else:
803
- width = GrpcValue(width)
798
+ width = Value(width)
804
799
  else:
805
- width = GrpcValue(width)
800
+ width = Value(width)
806
801
  if isinstance(height, str):
807
802
  if height in self._pedb.variables:
808
- height = GrpcValue(height, self._pedb.active_cell)
803
+ height = Value(height, self._pedb.active_cell)
809
804
  else:
810
- height = GrpcValue(width)
805
+ height = Value(width)
811
806
  else:
812
- height = GrpcValue(width)
807
+ height = Value(width)
813
808
  rect = Rectangle.create(
814
809
  layout=self._active_layout,
815
810
  layer=layer_name,
816
811
  net=edb_net,
817
812
  rep_type=rep_type,
818
- param1=GrpcValue(center_point[0]),
819
- param2=GrpcValue(center_point[1]),
820
- param3=GrpcValue(width),
821
- param4=GrpcValue(height),
822
- corner_rad=GrpcValue(corner_radius),
823
- rotation=GrpcValue(rotation),
813
+ param1=Value(center_point[0]),
814
+ param2=Value(center_point[1]),
815
+ param3=Value(width),
816
+ param4=Value(height),
817
+ corner_rad=Value(corner_radius),
818
+ rotation=Value(rotation),
824
819
  )
825
820
  if not rect.is_null:
826
821
  return Rectangle(self._pedb, rect)
@@ -855,9 +850,9 @@ class Modeler(object):
855
850
  layout=self._active_layout,
856
851
  layer=layer_name,
857
852
  net=edb_net,
858
- center_x=GrpcValue(x),
859
- center_y=GrpcValue(y),
860
- radius=GrpcValue(radius),
853
+ center_x=Value(x),
854
+ center_y=Value(y),
855
+ radius=Value(radius),
861
856
  )
862
857
  if not circle.is_null:
863
858
  return Circle(self._pedb, circle)
@@ -944,9 +939,9 @@ class Modeler(object):
944
939
  layout=self._active_layout,
945
940
  layer=void_circle.layer_name,
946
941
  net=void_circle.net,
947
- center_x=GrpcValue(circ_params[0]),
948
- center_y=GrpcValue(circ_params[1]),
949
- radius=GrpcValue(circ_params[2]),
942
+ center_x=Value(circ_params[0]),
943
+ center_y=Value(circ_params[1]),
944
+ radius=Value(circ_params[2]),
950
945
  )
951
946
  if not cloned_circle.is_null:
952
947
  cloned_circle.is_negative = True
@@ -1000,8 +995,8 @@ class Modeler(object):
1000
995
 
1001
996
  if not self._validatePoint(endPoint):
1002
997
  return None
1003
- startPoint = [GrpcValue(i) for i in startPoint]
1004
- endPoint = [GrpcValue(i) for i in endPoint]
998
+ startPoint = [Value(i) for i in startPoint]
999
+ endPoint = [Value(i) for i in endPoint]
1005
1000
  if len(endPoint) == 2:
1006
1001
  is_parametric = (
1007
1002
  is_parametric
@@ -1059,7 +1054,7 @@ class Modeler(object):
1059
1054
  else:
1060
1055
  k = 0
1061
1056
  for pt in points:
1062
- point = [GrpcValue(i) for i in pt]
1057
+ point = [Value(i) for i in pt]
1063
1058
  new_points = GrpcPointData(point)
1064
1059
  if len(point) > 2:
1065
1060
  k += 1
@@ -1163,14 +1158,14 @@ class Modeler(object):
1163
1158
  if not variable_value:
1164
1159
  variable_value = p.width
1165
1160
  self._pedb.active_cell.add_variable(
1166
- name=_parameter_name, value=GrpcValue(variable_value), is_param=True
1161
+ name=_parameter_name, value=Value(variable_value), is_param=True
1167
1162
  )
1168
- p.width = GrpcValue(_parameter_name, self._pedb.active_cell)
1163
+ p.width = Value(_parameter_name, self._pedb.active_cell)
1169
1164
  elif p.layer.name in layers_name:
1170
1165
  if not variable_value:
1171
1166
  variable_value = p.width
1172
1167
  self._pedb.add_design_variable(parameter_name, variable_value, True)
1173
- p.width = GrpcValue(_parameter_name, self._pedb.active_cell)
1168
+ p.width = Value(_parameter_name, self._pedb.active_cell)
1174
1169
  return True
1175
1170
 
1176
1171
  def unite_polygons_on_layer(
@@ -1199,6 +1194,8 @@ class Modeler(object):
1199
1194
  layer_name = [layer_name]
1200
1195
  if not layer_name:
1201
1196
  layer_name = list(self._pedb.stackup.signal_layers.keys())
1197
+ if net_names_list is None:
1198
+ net_names_list = []
1202
1199
 
1203
1200
  for lay in layer_name:
1204
1201
  self._logger.info(f"Uniting Objects on layer {lay}.")
@@ -1319,7 +1316,7 @@ class Modeler(object):
1319
1316
  primitives = self.primitives_by_layer[layer]
1320
1317
  for prim in primitives:
1321
1318
  if prim.primitive_type.name == "PATH":
1322
- surface += Path(self._pedb, prim).length * prim.cast().width.value
1319
+ surface += Path(self._pedb, prim).length * Value(prim.cast().width)
1323
1320
  if prim.primitive_type.name == "POLYGON":
1324
1321
  surface += prim.polygon_data.area()
1325
1322
  stat_model.occupying_surface[layer] = round(surface, 6)
@@ -1418,14 +1415,14 @@ class Modeler(object):
1418
1415
  bondwire_type=bondwire_type,
1419
1416
  definition_name=definition_name,
1420
1417
  placement_layer=placement_layer,
1421
- width=GrpcValue(width),
1418
+ width=Value(width),
1422
1419
  material=material,
1423
1420
  start_layer_name=start_layer_name,
1424
- start_x=GrpcValue(start_x),
1425
- start_y=GrpcValue(start_y),
1421
+ start_x=Value(start_x),
1422
+ start_y=Value(start_y),
1426
1423
  end_layer_name=end_layer_name,
1427
- end_x=GrpcValue(end_x),
1428
- end_y=GrpcValue(end_y),
1424
+ end_x=Value(end_x),
1425
+ end_y=Value(end_y),
1429
1426
  net=net,
1430
1427
  end_context=end_cell_inst,
1431
1428
  start_context=start_cell_inst,
@@ -22,6 +22,7 @@
22
22
 
23
23
  from __future__ import absolute_import # noreorder
24
24
 
25
+ from typing import Any, Dict, List, Optional, Set, Tuple, Union
25
26
  import warnings
26
27
 
27
28
  from pyedb.common.nets import CommonNets
@@ -152,7 +153,7 @@ class Nets(CommonNets):
152
153
  >>> edbapp.close()
153
154
  """
154
155
 
155
- def __getitem__(self, name):
156
+ def __getitem__(self, name: str) -> Net:
156
157
  """Get a net by name.
157
158
 
158
159
  Parameters
@@ -172,7 +173,7 @@ class Nets(CommonNets):
172
173
  """
173
174
  return Net(self._pedb, Net.find_by_name(self._active_layout, name))
174
175
 
175
- def __contains__(self, name):
176
+ def __contains__(self, name: str) -> bool:
176
177
  """Check if a net exists in the layout.
177
178
 
178
179
  Parameters
@@ -192,11 +193,11 @@ class Nets(CommonNets):
192
193
  """
193
194
  return name in self.nets
194
195
 
195
- def __init__(self, p_edb):
196
+ def __init__(self, p_edb: Any) -> None:
196
197
  """Initialize the Nets class."""
197
198
  CommonNets.__init__(self, p_edb)
198
- self._nets_by_comp_dict = {}
199
- self._comps_by_nets_dict = {}
199
+ self._nets_by_comp_dict: Dict[str, List[str]] = {}
200
+ self._comps_by_nets_dict: Dict[str, List[str]] = {}
200
201
 
201
202
  @property
202
203
  def _edb(self):
@@ -229,7 +230,7 @@ class Nets(CommonNets):
229
230
  return self._pedb.logger
230
231
 
231
232
  @property
232
- def nets(self):
233
+ def nets(self) -> Dict[str, Net]:
233
234
  """All nets in the layout.
234
235
 
235
236
  Returns
@@ -246,7 +247,7 @@ class Nets(CommonNets):
246
247
  return {i.name: i for i in self._pedb.layout.nets}
247
248
 
248
249
  @property
249
- def netlist(self):
250
+ def netlist(self) -> List[str]:
250
251
  """List of all net names.
251
252
 
252
253
  Returns
@@ -262,7 +263,7 @@ class Nets(CommonNets):
262
263
  return list(self.nets.keys())
263
264
 
264
265
  @property
265
- def signal(self):
266
+ def signal(self) -> Dict[str, Net]:
266
267
  """Signal nets in the layout.
267
268
 
268
269
  Returns
@@ -282,7 +283,7 @@ class Nets(CommonNets):
282
283
  return nets
283
284
 
284
285
  @property
285
- def power(self):
286
+ def power(self) -> Dict[str, Net]:
286
287
  """Power and ground nets in the layout.
287
288
 
288
289
  Returns
@@ -301,7 +302,7 @@ class Nets(CommonNets):
301
302
  nets[net] = value
302
303
  return nets
303
304
 
304
- def eligible_power_nets(self, threshold=0.3):
305
+ def eligible_power_nets(self, threshold: float = 0.3) -> List[Net]:
305
306
  """Identify nets eligible for power/ground classification based on area ratio.
306
307
 
307
308
  Uses the same algorithm implemented in SIwave.
@@ -343,7 +344,7 @@ class Nets(CommonNets):
343
344
  return pwr_gnd_nets
344
345
 
345
346
  @property
346
- def nets_by_components(self):
347
+ def nets_by_components(self) -> Dict[str, List[str]]:
347
348
  """Mapping of components to their associated nets.
348
349
 
349
350
  Returns
@@ -361,7 +362,7 @@ class Nets(CommonNets):
361
362
  return self._nets_by_comp_dict
362
363
 
363
364
  @property
364
- def components_by_nets(self):
365
+ def components_by_nets(self) -> Dict[str, List[str]]:
365
366
  """Mapping of nets to their associated components.
366
367
 
367
368
  Returns
@@ -384,13 +385,13 @@ class Nets(CommonNets):
384
385
 
385
386
  def generate_extended_nets(
386
387
  self,
387
- resistor_below=10,
388
- inductor_below=1,
389
- capacitor_above=1,
390
- exception_list=None,
391
- include_signal=True,
392
- include_power=True,
393
- ):
388
+ resistor_below: Union[int, float] = 10,
389
+ inductor_below: Union[int, float] = 1,
390
+ capacitor_above: Union[int, float] = 1,
391
+ exception_list: Optional[List[str]] = None,
392
+ include_signal: bool = True,
393
+ include_power: bool = True,
394
+ ) -> List[Any]:
394
395
  """Generate extended nets based on component thresholds.
395
396
 
396
397
  .. deprecated:: pyedb 0.30.0
@@ -430,7 +431,7 @@ class Nets(CommonNets):
430
431
  )
431
432
 
432
433
  @staticmethod
433
- def _get_points_for_plot(my_net_points):
434
+ def _get_points_for_plot(my_net_points: List[Any]) -> Tuple[List[float], List[float]]:
434
435
  """Get points for plotting.
435
436
 
436
437
  Parameters
@@ -464,7 +465,9 @@ class Nets(CommonNets):
464
465
  # fmt: on
465
466
  return x, y
466
467
 
467
- def classify_nets(self, power_nets=None, signal_nets=None):
468
+ def classify_nets(
469
+ self, power_nets: Optional[Union[str, List[str]]] = None, signal_nets: Optional[Union[str, List[str]]] = None
470
+ ) -> bool:
468
471
  """Reassign net classifications as power/ground or signal.
469
472
 
470
473
  Parameters
@@ -502,7 +505,7 @@ class Nets(CommonNets):
502
505
  self.nets[net].is_power_ground = False
503
506
  return True
504
507
 
505
- def is_power_gound_net(self, netname_list):
508
+ def is_power_gound_net(self, netname_list: Union[str, List[str]]) -> bool:
506
509
  """Check if any net in a list is a power/ground net.
507
510
 
508
511
  Parameters
@@ -528,7 +531,7 @@ class Nets(CommonNets):
528
531
  return True
529
532
  return False
530
533
 
531
- def get_dcconnected_net_list(self, ground_nets=["GND"], res_value=0.001):
534
+ def get_dcconnected_net_list(self, ground_nets: List[str] = ["GND"], res_value: float = 0.001) -> List[Set[str]]:
532
535
  """Get nets connected to DC through inductors and low-value resistors.
533
536
 
534
537
  Parameters
@@ -586,7 +589,9 @@ class Nets(CommonNets):
586
589
 
587
590
  return dcconnected_net_list
588
591
 
589
- def get_powertree(self, power_net_name, ground_nets):
592
+ def get_powertree(
593
+ self, power_net_name: str, ground_nets: List[str]
594
+ ) -> Tuple[List[List[str]], List[str], List[str]]:
590
595
  """Retrieve power tree for a given power net.
591
596
 
592
597
  Parameters
@@ -654,7 +659,7 @@ class Nets(CommonNets):
654
659
  ]
655
660
  return component_list, component_list_columns, net_group
656
661
 
657
- def get_net_by_name(self, net_name):
662
+ def get_net_by_name(self, net_name: str) -> Optional[Net]:
658
663
  """Find a net by name.
659
664
 
660
665
  Parameters
@@ -677,7 +682,7 @@ class Nets(CommonNets):
677
682
  if edb_net is not None:
678
683
  return edb_net
679
684
 
680
- def delete(self, netlist):
685
+ def delete(self, netlist: Union[str, List[str]]) -> List[str]:
681
686
  """Delete one or more nets from the layout.
682
687
 
683
688
  Parameters
@@ -708,7 +713,9 @@ class Nets(CommonNets):
708
713
  nets_deleted.append(i.name)
709
714
  return nets_deleted
710
715
 
711
- def find_or_create_net(self, net_name="", start_with="", contain="", end_with=""):
716
+ def find_or_create_net(
717
+ self, net_name: str = "", start_with: str = "", contain: str = "", end_with: str = ""
718
+ ) -> Union[Net, List[Net]]:
712
719
  """Find or create a net based on given criteria.
713
720
 
714
721
  Parameters
@@ -789,7 +796,7 @@ class Nets(CommonNets):
789
796
  nets_found = [self.nets[net] for net in list(self.nets.keys()) if contain in net.lower()]
790
797
  return nets_found
791
798
 
792
- def is_net_in_component(self, component_name, net_name):
799
+ def is_net_in_component(self, component_name: str, net_name: str) -> bool:
793
800
  """Check if a net belongs to a component.
794
801
 
795
802
  Parameters
@@ -817,8 +824,12 @@ class Nets(CommonNets):
817
824
  return False
818
825
 
819
826
  def find_and_fix_disjoint_nets(
820
- self, net_list=None, keep_only_main_net=False, clean_disjoints_less_than=0.0, order_by_area=False
821
- ):
827
+ self,
828
+ net_list: Optional[List[str]] = None,
829
+ keep_only_main_net: bool = False,
830
+ clean_disjoints_less_than: float = 0.0,
831
+ order_by_area: bool = False,
832
+ ) -> List[str]:
822
833
  """Find and fix disjoint nets.
823
834
 
824
835
  .. deprecated:: pyedb 0.30.0
@@ -856,7 +867,7 @@ class Nets(CommonNets):
856
867
  net_list, keep_only_main_net, clean_disjoints_less_than, order_by_area
857
868
  )
858
869
 
859
- def merge_nets_polygons(self, net_names_list):
870
+ def merge_nets_polygons(self, net_names_list: Union[str, List[str]]) -> bool:
860
871
  """Merge polygons for specified nets on each layer.
861
872
 
862
873
  Parameters