Skip to content

Commit

Permalink
CHORE: Auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
For more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 22, 2025
1 parent d78f1b9 commit cde3790
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/ansys/aedt/core/visualization/advanced/touchstone_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import subprocess # nosec
import warnings

from ansys.aedt.core import Edb
from ansys.aedt.core.aedt_logger import pyaedt_logger as logger
from ansys.aedt.core.generic.aedt_versions import aedt_versions
from ansys.aedt.core.generic.general_methods import open_file
from ansys.aedt.core.generic.general_methods import pyaedt_function_handler
from ansys.aedt.core import Edb

try:
import numpy as np
Expand Down Expand Up @@ -114,13 +114,15 @@ def __init__(self, solution_data=None, touchstone_file=None):

@pyaedt_function_handler()
def get_coupling_in_range(
self, start_frequency=1e9,
low_loss=-40,
high_loss=-60,
frequency_sample=5,
output_file=None,
aedb_path=None,
design_name=None):
self,
start_frequency=1e9,
low_loss=-40,
high_loss=-60,
frequency_sample=5,
output_file=None,
aedb_path=None,
design_name=None,
):
"""Get coupling losses, excluding return loss, that has at least one frequency point between a range of
losses.
Expand Down Expand Up @@ -182,11 +184,11 @@ def get_coupling_in_range(
print(port1, port2)

Check warning on line 184 in src/ansys/aedt/core/visualization/advanced/touchstone_parser.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/advanced/touchstone_parser.py#L172-L184

Added lines #L172 - L184 were not covered by tests
# This if statement is mandatory as the codeword to use is different with regard to
# port type: Circuit(.location) or Gap(.position)
if edbapp.ports[port1].hfss_type == 'Circuit':
if edbapp.ports[port1].hfss_type == "Circuit":
loc_port_1 = edbapp.ports[port1].location

Check warning on line 188 in src/ansys/aedt/core/visualization/advanced/touchstone_parser.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/advanced/touchstone_parser.py#L187-L188

Added lines #L187 - L188 were not covered by tests
else:
loc_port_1 = edbapp.ports[port1].position
if edbapp.ports[port2].hfss_type == 'Circuit':
if edbapp.ports[port2].hfss_type == "Circuit":
loc_port_2 = edbapp.ports[port2].location

Check warning on line 192 in src/ansys/aedt/core/visualization/advanced/touchstone_parser.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/advanced/touchstone_parser.py#L190-L192

Added lines #L190 - L192 were not covered by tests
else:
loc_port_2 = edbapp.ports[port2].position

Check warning on line 194 in src/ansys/aedt/core/visualization/advanced/touchstone_parser.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/advanced/touchstone_parser.py#L194

Added line #L194 was not covered by tests
Expand Down

0 comments on commit cde3790

Please sign in to comment.