pyedb 0.51.2__py3-none-any.whl → 0.53.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 (38) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_common.py +12 -15
  3. pyedb/configuration/cfg_data.py +2 -2
  4. pyedb/configuration/cfg_modeler.py +163 -234
  5. pyedb/configuration/cfg_stackup.py +62 -249
  6. pyedb/configuration/configuration.py +356 -409
  7. pyedb/dotnet/database/components.py +9 -3
  8. pyedb/dotnet/database/dotnet/database.py +4 -0
  9. pyedb/dotnet/database/edb_data/layer_data.py +3 -1
  10. pyedb/dotnet/database/edb_data/padstacks_data.py +8 -2
  11. pyedb/dotnet/database/layout_validation.py +3 -13
  12. pyedb/dotnet/database/siwave.py +14 -0
  13. pyedb/dotnet/database/stackup.py +8 -61
  14. pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
  15. pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +894 -0
  16. pyedb/dotnet/database/utilities/siwave_simulation_setup.py +15 -0
  17. pyedb/dotnet/edb.py +50 -3
  18. pyedb/generic/design_types.py +29 -0
  19. pyedb/generic/grpc_warnings.py +5 -0
  20. pyedb/grpc/database/__init__.py +0 -1
  21. pyedb/grpc/database/components.py +102 -81
  22. pyedb/grpc/database/control_file.py +240 -193
  23. pyedb/grpc/database/definition/materials.py +7 -7
  24. pyedb/grpc/database/definitions.py +7 -5
  25. pyedb/grpc/database/hierarchy/pin_pair_model.py +1 -1
  26. pyedb/grpc/database/modeler.py +105 -77
  27. pyedb/grpc/database/net/differential_pair.py +2 -1
  28. pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +961 -0
  29. pyedb/grpc/database/siwave.py +14 -0
  30. pyedb/grpc/database/source_excitations.py +10 -10
  31. pyedb/grpc/edb.py +156 -180
  32. pyedb/grpc/edb_init.py +4 -2
  33. pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
  34. pyedb/siwave_core/product_properties.py +198 -0
  35. {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/METADATA +16 -14
  36. {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/RECORD +38 -33
  37. {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info}/WHEEL +1 -1
  38. {pyedb-0.51.2.dist-info → pyedb-0.53.0.dist-info/licenses}/LICENSE +0 -0
@@ -280,6 +280,21 @@ class SiwaveSimulationSetup(SimulationSetup):
280
280
  """List of frequency sweeps."""
281
281
  return {i.name: i for i in self._siwave_sweeps_list}
282
282
 
283
+ @property
284
+ def dc_settings(self):
285
+ """SIwave DC setting."""
286
+ return DCSettings(self)
287
+
288
+ @property
289
+ def dc_advanced_settings(self):
290
+ """Siwave DC advanced settings.
291
+
292
+ Returns
293
+ -------
294
+ :class:`pyedb.dotnet.database.edb_data.siwave_simulation_setup_data.SiwaveDCAdvancedSettings`
295
+ """
296
+ return DCAdvancedSettings(self)
297
+
283
298
 
284
299
  class SiwaveDCSimulationSetup(SimulationSetup):
285
300
  """Manages EDB methods for SIwave DC simulation setup."""
pyedb/dotnet/edb.py CHANGED
@@ -104,6 +104,7 @@ from pyedb.generic.process import SiwaveSolve
104
104
  from pyedb.generic.settings import settings
105
105
  from pyedb.ipc2581.ipc2581 import Ipc2581
106
106
  from pyedb.modeler.geometry_operators import GeometryOperators
107
+ from pyedb.siwave_core.product_properties import SIwaveProperties
107
108
  from pyedb.workflow import Workflow
108
109
 
109
110
 
@@ -397,8 +398,7 @@ class Edb(Database):
397
398
 
398
399
  @property
399
400
  def pedb_class(self):
400
- if not self.grpc:
401
- return pyedb.dotnet
401
+ return pyedb.dotnet
402
402
 
403
403
  @property
404
404
  def grpc(self):
@@ -1238,7 +1238,7 @@ class Edb(Database):
1238
1238
  return self._core_primitives
1239
1239
 
1240
1240
  @property
1241
- def layout(self):
1241
+ def layout(self) -> Layout:
1242
1242
  """Layout object.
1243
1243
 
1244
1244
  Returns
@@ -3696,6 +3696,7 @@ class Edb(Database):
3696
3696
  Dict[str, :class:`legacy.database.edb_data.siwave_simulation_setup_data.SiwaveSYZSimulationSetup`]
3697
3697
 
3698
3698
  """
3699
+
3699
3700
  setups = {}
3700
3701
  for i in list(self.active_cell.SimulationSetups):
3701
3702
  if i.GetType().ToString().endswith("kHFSS"):
@@ -3708,6 +3709,18 @@ class Edb(Database):
3708
3709
  setups[i.GetName()] = RaptorXSimulationSetup(self, i)
3709
3710
  elif i.GetType().ToString().endswith("kHFSSPI"):
3710
3711
  setups[i.GetName()] = HFSSPISimulationSetup(self, i)
3712
+ try:
3713
+ cpa_setup_name = self.active_cell.GetProductProperty(
3714
+ self._edb.ProductId.SIWave, SIwaveProperties.CPA_SIM_NAME
3715
+ )[-1]
3716
+ except:
3717
+ cpa_setup_name = ""
3718
+ if cpa_setup_name:
3719
+ from pyedb.dotnet.database.utilities.siwave_cpa_simulation_setup import (
3720
+ SIWaveCPASimulationSetup,
3721
+ )
3722
+
3723
+ setups[cpa_setup_name] = SIWaveCPASimulationSetup(self, cpa_setup_name)
3711
3724
  return setups
3712
3725
 
3713
3726
  @property
@@ -4735,3 +4748,37 @@ class Edb(Database):
4735
4748
  return self.variables[variable_name]
4736
4749
  else:
4737
4750
  return False
4751
+
4752
+ def compare(self, input_file, results=""):
4753
+ """Compares current open database with another one.
4754
+
4755
+ Parameters
4756
+ ----------
4757
+ input_file : str
4758
+ Path to the edb file.
4759
+ results: str, optional
4760
+ Path to directory in which results will be saved. If no path is given, a new "_compare_results"
4761
+ directory will be created with the same naming and path as the .aedb folder.
4762
+ Returns
4763
+ -------
4764
+ bool
4765
+ ``True`` when successful, ``False`` when failed.
4766
+ """
4767
+ self.save()
4768
+ if not results:
4769
+ results = self.edbpath[:-5] + "_compare_results"
4770
+ os.mkdir(results)
4771
+ command = os.path.join(self.base_path, "EDBDiff.exe")
4772
+ if is_linux:
4773
+ mono_path = os.path.join(self.base_path, "common/mono/Linux64/bin/mono")
4774
+ cmd_input = [mono_path, command, input_file, self.edbpath, results]
4775
+ else:
4776
+ cmd_input = [command, input_file, self.edbpath, results]
4777
+ subprocess.run(cmd_input)
4778
+
4779
+ if not os.path.exists(os.path.join(results, "EDBDiff.csv")):
4780
+ self.logger.error("Comparison execution failed")
4781
+ return False
4782
+ else:
4783
+ self.logger.info("Comparison correctly completed")
4784
+ return True
@@ -19,6 +19,29 @@
19
19
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
+ from typing import TYPE_CHECKING, Literal, Union, overload
23
+ import warnings
24
+
25
+ from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
26
+
27
+ if TYPE_CHECKING:
28
+ from pyedb.dotnet.edb import Edb as EdbDotnet
29
+ from pyedb.grpc.edb import Edb as EdbGrpc
30
+
31
+
32
+ @overload
33
+ def Edb(*, grpc: Literal[True], **kwargs) -> "EdbGrpc":
34
+ ...
35
+
36
+
37
+ @overload
38
+ def Edb(*, grpc: Literal[False] = False, **kwargs) -> "EdbDotnet":
39
+ ...
40
+
41
+
42
+ @overload
43
+ def Edb(*, grpc: bool, **kwargs) -> Union["EdbGrpc", "EdbDotnet"]:
44
+ ...
22
45
 
23
46
 
24
47
  # lazy imports
@@ -235,6 +258,12 @@ def Edb(
235
258
  """
236
259
 
237
260
  # Use EDB legacy (default choice)
261
+ if float(edbversion) >= 2025.2:
262
+ if not grpc:
263
+ warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
264
+ else:
265
+ if grpc:
266
+ raise ValueError(f"gRPC flag was enabled however your ANSYS AEDT version {edbversion} is not compatible")
238
267
  if grpc:
239
268
  from pyedb.grpc.edb import Edb as app
240
269
  else:
@@ -0,0 +1,5 @@
1
+ GRPC_GENERAL_WARNING = (
2
+ "Your ANSYS AEDT version is eligible to gRPC version."
3
+ "You might consider switching to that version for better user experience."
4
+ "For more information please check this link: https://edb.docs.pyansys.com/version/dev/grpc_api/index.html"
5
+ )
@@ -1 +0,0 @@
1
- from __future__ import absolute_import # noreorder
@@ -28,7 +28,7 @@ import json
28
28
  import math
29
29
  import os
30
30
  import re
31
- from typing import Union
31
+ from typing import Any, Dict, List, Optional, Tuple, Union
32
32
  import warnings
33
33
 
34
34
  from ansys.edb.core.definition.die_property import DieOrientation as GrpDieOrientation
@@ -100,7 +100,7 @@ class Components(object):
100
100
  >>> edbapp.components
101
101
  """
102
102
 
103
- def __getitem__(self, name):
103
+ def __getitem__(self, name: str) -> Optional[Union[Component, ComponentDef]]:
104
104
  """Get a component or component definition by name.
105
105
 
106
106
  Parameters
@@ -125,7 +125,7 @@ class Components(object):
125
125
  self._pedb.logger.error("Component or definition not found.")
126
126
  return
127
127
 
128
- def __init__(self, p_edb):
128
+ def __init__(self, p_edb: Any) -> None:
129
129
  self._pedb = p_edb
130
130
  self.refresh_components()
131
131
  self._pins = {}
@@ -133,7 +133,7 @@ class Components(object):
133
133
  self._padstack = Padstacks(self._pedb)
134
134
 
135
135
  @property
136
- def _logger(self):
136
+ def _logger(self) -> Any:
137
137
  """Logger instance for the component manager.
138
138
 
139
139
  Returns
@@ -188,7 +188,7 @@ class Components(object):
188
188
  return self._pedb.active_db
189
189
 
190
190
  @property
191
- def instances(self) -> dict[str, Component]:
191
+ def instances(self) -> Dict[str, Component]:
192
192
  """Dictionary of all component instances in the layout.
193
193
 
194
194
  Returns
@@ -203,7 +203,7 @@ class Components(object):
203
203
  return self._cmp
204
204
 
205
205
  @property
206
- def definitions(self) -> dict[str, ComponentDef]:
206
+ def definitions(self) -> Dict[str, ComponentDef]:
207
207
  """Dictionary of all component definitions.
208
208
 
209
209
  Returns
@@ -218,7 +218,7 @@ class Components(object):
218
218
  return {l.name: ComponentDef(self._pedb, l) for l in self._pedb.component_defs}
219
219
 
220
220
  @property
221
- def nport_comp_definition(self) -> dict[str, Component]:
221
+ def nport_comp_definition(self) -> Dict[str, Component]:
222
222
  """Dictionary of N-port component definitions.
223
223
 
224
224
  Returns
@@ -371,7 +371,7 @@ class Components(object):
371
371
  return True
372
372
 
373
373
  @property
374
- def resistors(self) -> dict[str, Component]:
374
+ def resistors(self) -> Dict[str, Component]:
375
375
  """Dictionary of resistor components.
376
376
 
377
377
  Returns
@@ -386,7 +386,7 @@ class Components(object):
386
386
  return self._res
387
387
 
388
388
  @property
389
- def capacitors(self) -> dict[str, Component]:
389
+ def capacitors(self) -> Dict[str, Component]:
390
390
  """Dictionary of capacitor components.
391
391
 
392
392
  Returns
@@ -401,7 +401,7 @@ class Components(object):
401
401
  return self._cap
402
402
 
403
403
  @property
404
- def inductors(self) -> dict[str, Component]:
404
+ def inductors(self) -> Dict[str, Component]:
405
405
  """Dictionary of inductor components.
406
406
 
407
407
  Returns
@@ -416,7 +416,7 @@ class Components(object):
416
416
  return self._ind
417
417
 
418
418
  @property
419
- def ICs(self) -> dict[str, Component]:
419
+ def ICs(self) -> Dict[str, Component]:
420
420
  """Dictionary of integrated circuit components.
421
421
 
422
422
  Returns
@@ -431,7 +431,7 @@ class Components(object):
431
431
  return self._ics
432
432
 
433
433
  @property
434
- def IOs(self) -> dict[str, Component]:
434
+ def IOs(self) -> Dict[str, Component]:
435
435
  """Dictionary of I/O components.
436
436
 
437
437
  Returns
@@ -446,7 +446,7 @@ class Components(object):
446
446
  return self._ios
447
447
 
448
448
  @property
449
- def Others(self) -> dict[str, Component]:
449
+ def Others(self) -> Dict[str, Component]:
450
450
  """Dictionary of other components.
451
451
 
452
452
  Returns
@@ -461,7 +461,7 @@ class Components(object):
461
461
  return self._others
462
462
 
463
463
  @property
464
- def components_by_partname(self) -> dict[str, list[Component]]:
464
+ def components_by_partname(self) -> Dict[str, List[Component]]:
465
465
  """Dictionary of components grouped by part name.
466
466
 
467
467
  Returns
@@ -500,7 +500,12 @@ class Components(object):
500
500
  """
501
501
  return self.instances[name]
502
502
 
503
- def get_pin_from_component(self, component, net_name=None, pin_name=None) -> list:
503
+ def get_pin_from_component(
504
+ self,
505
+ component: Union[str, Component],
506
+ net_name: Optional[Union[str, List[str]]] = None,
507
+ pin_name: Optional[str] = None,
508
+ ) -> List[Any]:
504
509
  """Get pins from a component with optional filtering.
505
510
 
506
511
  Parameters
@@ -559,7 +564,7 @@ class Components(object):
559
564
  cmp_list.append(refdes)
560
565
  return cmp_list
561
566
 
562
- def _get_edb_pin_from_pin_name(self, cmp, pin) -> Union[ComponentPin, bool]:
567
+ def _get_edb_pin_from_pin_name(self, cmp: Component, pin: str) -> Union[ComponentPin, bool]:
563
568
  """Get EDB pin from pin name.
564
569
 
565
570
  Parameters
@@ -584,14 +589,14 @@ class Components(object):
584
589
 
585
590
  def get_component_placement_vector(
586
591
  self,
587
- mounted_component,
588
- hosting_component,
589
- mounted_component_pin1,
590
- mounted_component_pin2,
591
- hosting_component_pin1,
592
- hosting_component_pin2,
593
- flipped=False,
594
- ) -> tuple:
592
+ mounted_component: Component,
593
+ hosting_component: Component,
594
+ mounted_component_pin1: str,
595
+ mounted_component_pin2: str,
596
+ hosting_component_pin1: str,
597
+ hosting_component_pin2: str,
598
+ flipped: bool = False,
599
+ ) -> Tuple[bool, List[float], float, float]:
595
600
  """Get placement vector between two components.
596
601
 
597
602
  Parameters
@@ -670,7 +675,7 @@ class Components(object):
670
675
  self._logger.warning("Failed to compute vector.")
671
676
  return False, [0, 0], 0, 0
672
677
 
673
- def get_solder_ball_height(self, cmp) -> float:
678
+ def get_solder_ball_height(self, cmp: Union[str, Component]) -> float:
674
679
  """Get solder ball height of a component.
675
680
 
676
681
  Parameters
@@ -1012,15 +1017,15 @@ class Components(object):
1012
1017
 
1013
1018
  def create(
1014
1019
  self,
1015
- pins,
1016
- component_name=None,
1017
- placement_layer=None,
1018
- component_part_name=None,
1019
- is_rlc=False,
1020
- r_value=None,
1021
- c_value=None,
1022
- l_value=None,
1023
- is_parallel=False,
1020
+ pins: List[Any],
1021
+ component_name: Optional[str] = None,
1022
+ placement_layer: Optional[str] = None,
1023
+ component_part_name: Optional[str] = None,
1024
+ is_rlc: bool = False,
1025
+ r_value: Optional[float] = None,
1026
+ c_value: Optional[float] = None,
1027
+ l_value: Optional[float] = None,
1028
+ is_parallel: bool = False,
1024
1029
  ) -> Union[Component, bool]:
1025
1030
  """Create a new component.
1026
1031
 
@@ -1156,7 +1161,13 @@ class Components(object):
1156
1161
  is_rlc=False,
1157
1162
  )
1158
1163
 
1159
- def set_component_model(self, componentname, model_type="Spice", modelpath=None, modelname=None) -> bool:
1164
+ def set_component_model(
1165
+ self,
1166
+ componentname: str,
1167
+ model_type: str = "Spice",
1168
+ modelpath: Optional[str] = None,
1169
+ modelname: Optional[str] = None,
1170
+ ) -> bool:
1160
1171
  """Set component model.
1161
1172
 
1162
1173
  Parameters
@@ -1228,7 +1239,7 @@ class Components(object):
1228
1239
  component.component_property.model = s_parameter_mod
1229
1240
  return True
1230
1241
 
1231
- def create_pingroup_from_pins(self, pins, group_name=None) -> Union[PinGroup, bool]:
1242
+ def create_pingroup_from_pins(self, pins: List[Any], group_name: Optional[str] = None) -> Union[PinGroup, bool]:
1232
1243
  """Create pin group from pins.
1233
1244
 
1234
1245
  Parameters
@@ -1279,7 +1290,7 @@ class Components(object):
1279
1290
  pin_group.net = pins[0].net
1280
1291
  return pin_group
1281
1292
 
1282
- def delete_single_pin_rlc(self, deactivate_only=False) -> list[str]:
1293
+ def delete_single_pin_rlc(self, deactivate_only: bool = False) -> List[str]:
1283
1294
  """Delete or deactivate single-pin RLC components.
1284
1295
 
1285
1296
  Parameters
@@ -1310,7 +1321,7 @@ class Components(object):
1310
1321
  self._pedb.logger.info("Deleted {} components".format(len(deleted_comps)))
1311
1322
  return deleted_comps
1312
1323
 
1313
- def delete(self, component_name) -> bool:
1324
+ def delete(self, component_name: str) -> bool:
1314
1325
  """Delete a component.
1315
1326
 
1316
1327
  Parameters
@@ -1335,7 +1346,7 @@ class Components(object):
1335
1346
  return True
1336
1347
  return False
1337
1348
 
1338
- def disable_rlc_component(self, component_name) -> bool:
1349
+ def disable_rlc_component(self, component_name: str) -> bool:
1339
1350
  """Disable RLC component.
1340
1351
 
1341
1352
  Parameters
@@ -1369,16 +1380,16 @@ class Components(object):
1369
1380
 
1370
1381
  def set_solder_ball(
1371
1382
  self,
1372
- component="",
1373
- sball_diam=None,
1374
- sball_height=None,
1375
- shape="Cylinder",
1376
- sball_mid_diam=None,
1377
- chip_orientation="chip_down",
1378
- auto_reference_size=True,
1379
- reference_size_x=0,
1380
- reference_size_y=0,
1381
- reference_height=0,
1383
+ component: Union[str, Component] = "",
1384
+ sball_diam: Optional[float] = None,
1385
+ sball_height: Optional[float] = None,
1386
+ shape: str = "Cylinder",
1387
+ sball_mid_diam: Optional[float] = None,
1388
+ chip_orientation: str = "chip_down",
1389
+ auto_reference_size: bool = True,
1390
+ reference_size_x: float = 0,
1391
+ reference_size_y: float = 0,
1392
+ reference_height: float = 0,
1382
1393
  ) -> bool:
1383
1394
  """Set solder ball properties for a component.
1384
1395
 
@@ -1466,11 +1477,11 @@ class Components(object):
1466
1477
 
1467
1478
  def set_component_rlc(
1468
1479
  self,
1469
- componentname,
1470
- res_value=None,
1471
- ind_value=None,
1472
- cap_value=None,
1473
- isparallel=False,
1480
+ componentname: str,
1481
+ res_value: Optional[float] = None,
1482
+ ind_value: Optional[float] = None,
1483
+ cap_value: Optional[float] = None,
1484
+ isparallel: bool = False,
1474
1485
  ) -> bool:
1475
1486
  """Set RLC values for a component.
1476
1487
 
@@ -1539,11 +1550,11 @@ class Components(object):
1539
1550
 
1540
1551
  def update_rlc_from_bom(
1541
1552
  self,
1542
- bom_file,
1543
- delimiter=";",
1544
- valuefield="Func des",
1545
- comptype="Prod name",
1546
- refdes="Pos / Place",
1553
+ bom_file: str,
1554
+ delimiter: str = ";",
1555
+ valuefield: str = "Func des",
1556
+ comptype: str = "Prod name",
1557
+ refdes: str = "Pos / Place",
1547
1558
  ) -> bool:
1548
1559
  """Update RLC values from BOM file.
1549
1560
 
@@ -1604,12 +1615,12 @@ class Components(object):
1604
1615
 
1605
1616
  def import_bom(
1606
1617
  self,
1607
- bom_file,
1608
- delimiter=",",
1609
- refdes_col=0,
1610
- part_name_col=1,
1611
- comp_type_col=2,
1612
- value_col=3,
1618
+ bom_file: str,
1619
+ delimiter: str = ",",
1620
+ refdes_col: int = 0,
1621
+ part_name_col: int = 1,
1622
+ comp_type_col: int = 2,
1623
+ value_col: int = 3,
1613
1624
  ) -> bool:
1614
1625
  """Import BOM file.
1615
1626
 
@@ -1693,7 +1704,7 @@ class Components(object):
1693
1704
  self.instances[comp].enabled = False
1694
1705
  return True
1695
1706
 
1696
- def export_bom(self, bom_file, delimiter=",") -> bool:
1707
+ def export_bom(self, bom_file: str, delimiter: str = ",") -> bool:
1697
1708
  """Export BOM file.
1698
1709
 
1699
1710
  Parameters
@@ -1732,7 +1743,7 @@ class Components(object):
1732
1743
  f.writelines([delimiter.join([refdes, part_name, comp_type, value + "\n"])])
1733
1744
  return True
1734
1745
 
1735
- def find_by_reference_designator(self, reference_designator) -> Component:
1746
+ def find_by_reference_designator(self, reference_designator: str) -> Component:
1736
1747
  """Find component by reference designator.
1737
1748
 
1738
1749
  Parameters
@@ -1751,7 +1762,7 @@ class Components(object):
1751
1762
  """
1752
1763
  return self.instances[reference_designator]
1753
1764
 
1754
- def get_aedt_pin_name(self, pin) -> str:
1765
+ def get_aedt_pin_name(self, pin: Any) -> str:
1755
1766
  """Get AEDT pin name.
1756
1767
 
1757
1768
  Parameters
@@ -1770,7 +1781,9 @@ class Components(object):
1770
1781
  """
1771
1782
  return pin.aedt_name
1772
1783
 
1773
- def get_pins(self, reference_designator, net_name=None, pin_name=None) -> dict:
1784
+ def get_pins(
1785
+ self, reference_designator: str, net_name: Optional[str] = None, pin_name: Optional[str] = None
1786
+ ) -> Dict[str, Any]:
1774
1787
  """Get pins of a component.
1775
1788
 
1776
1789
  Parameters
@@ -1802,7 +1815,7 @@ class Components(object):
1802
1815
 
1803
1816
  return pins
1804
1817
 
1805
- def get_pin_position(self, pin) -> list[float]:
1818
+ def get_pin_position(self, pin: Any) -> List[float]:
1806
1819
  """Get pin position.
1807
1820
 
1808
1821
  Parameters
@@ -1827,7 +1840,7 @@ class Components(object):
1827
1840
  transformed_pt_pos = pin.component.transform.transform_point(pt_pos)
1828
1841
  return [transformed_pt_pos[0].value, transformed_pt_pos[1].value]
1829
1842
 
1830
- def get_pins_name_from_net(self, net_name, pin_list=None) -> list[str]:
1843
+ def get_pins_name_from_net(self, net_name: str, pin_list: Optional[List[Any]] = None) -> List[str]:
1831
1844
  """Get pin names from net.
1832
1845
 
1833
1846
  Parameters
@@ -1858,7 +1871,7 @@ class Components(object):
1858
1871
  pin_names.append(self.get_aedt_pin_name(pin))
1859
1872
  return pin_names
1860
1873
 
1861
- def get_nets_from_pin_list(self, pins) -> list[str]:
1874
+ def get_nets_from_pin_list(self, pins: List[Any]) -> List[str]:
1862
1875
  """Get nets from pin list.
1863
1876
 
1864
1877
  Parameters
@@ -1877,7 +1890,7 @@ class Components(object):
1877
1890
  """
1878
1891
  return list(set([pin.net.name for pin in pins]))
1879
1892
 
1880
- def get_component_net_connection_info(self, refdes) -> dict:
1893
+ def get_component_net_connection_info(self, refdes: str) -> Dict[str, List[str]]:
1881
1894
  """Get net connection info for a component.
1882
1895
 
1883
1896
  Parameters
@@ -1905,7 +1918,7 @@ class Components(object):
1905
1918
  data["net_name"].append(net_name)
1906
1919
  return data
1907
1920
 
1908
- def get_rats(self) -> list[dict]:
1921
+ def get_rats(self) -> List[Dict[str, List[str]]]:
1909
1922
  """Get RATS (Reference Designator, Pin, Net) information.
1910
1923
 
1911
1924
  Returns
@@ -1923,7 +1936,7 @@ class Components(object):
1923
1936
  df_list.append(df)
1924
1937
  return df_list
1925
1938
 
1926
- def get_through_resistor_list(self, threshold=1) -> list[str]:
1939
+ def get_through_resistor_list(self, threshold: float = 1) -> List[str]:
1927
1940
  """Get through resistors below threshold.
1928
1941
 
1929
1942
  Parameters
@@ -1953,7 +1966,9 @@ class Components(object):
1953
1966
 
1954
1967
  return through_comp_list
1955
1968
 
1956
- def short_component_pins(self, component_name, pins_to_short=None, width=1e-3) -> bool:
1969
+ def short_component_pins(
1970
+ self, component_name: str, pins_to_short: Optional[List[str]] = None, width: float = 1e-3
1971
+ ) -> bool:
1957
1972
  """Short component pins with traces.
1958
1973
 
1959
1974
  Parameters
@@ -2089,7 +2104,9 @@ class Components(object):
2089
2104
  i += 1
2090
2105
  return True
2091
2106
 
2092
- def create_pin_group(self, reference_designator, pin_numbers, group_name=None) -> Union[tuple[str, PinGroup], bool]:
2107
+ def create_pin_group(
2108
+ self, reference_designator: str, pin_numbers: Union[str, List[str]], group_name: Optional[str] = None
2109
+ ) -> Union[Tuple[str, PinGroup], bool]:
2093
2110
  """Create pin group on a component.
2094
2111
 
2095
2112
  Parameters
@@ -2134,7 +2151,9 @@ class Components(object):
2134
2151
  return group_name, PinGroup(self._pedb, pingroup)
2135
2152
  return False
2136
2153
 
2137
- def create_pin_group_on_net(self, reference_designator, net_name, group_name=None) -> PinGroup:
2154
+ def create_pin_group_on_net(
2155
+ self, reference_designator: str, net_name: str, group_name: Optional[str] = None
2156
+ ) -> PinGroup:
2138
2157
  """Create pin group by net name.
2139
2158
 
2140
2159
  Parameters
@@ -2160,7 +2179,9 @@ class Components(object):
2160
2179
  ]
2161
2180
  return self.create_pin_group(reference_designator, pins, group_name)
2162
2181
 
2163
- def deactivate_rlc_component(self, component=None, create_circuit_port=False, pec_boundary=False):
2182
+ def deactivate_rlc_component(
2183
+ self, component: Optional[str] = None, create_circuit_port: bool = False, pec_boundary: bool = False
2184
+ ) -> bool:
2164
2185
  """Deactivate RLC component with a possibility to convert it to a circuit port.
2165
2186
 
2166
2187
  Parameters
@@ -2207,7 +2228,7 @@ class Components(object):
2207
2228
  component=component.refdes, circuit_ports=create_circuit_port, pec_boundary=pec_boundary
2208
2229
  )
2209
2230
 
2210
- def replace_rlc_by_gap_boundaries(self, component=None):
2231
+ def replace_rlc_by_gap_boundaries(self, component: Optional[Union[str, Component]] = None) -> bool:
2211
2232
  """Replace RLC component by RLC gap boundaries. These boundary types are compatible with 3D modeler export.
2212
2233
  Only 2 pins RLC components are supported in this command.
2213
2234
 
@@ -2243,7 +2264,7 @@ class Components(object):
2243
2264
  component.enabled = False
2244
2265
  return self._pedb.source_excitation.add_rlc_boundary(component.refdes, False)
2245
2266
 
2246
- def add_rlc_boundary(self, component=None, circuit_type=True):
2267
+ def add_rlc_boundary(self, component: Optional[Union[str, Component]] = None, circuit_type: bool = True) -> bool:
2247
2268
  """Add RLC gap boundary on component and replace it with a circuit port.
2248
2269
  The circuit port supports only 2-pin components.
2249
2270