Skip to content

Commit

Permalink
Remove useless pass statements. (#4421)
Browse files Browse the repository at this point in the history
Co-authored-by: Massimo Capodiferro <77293250+maxcapodi78@users.noreply.github.com>
  • Loading branch information
MaxJPRey and maxcapodi78 authored Mar 28, 2024
1 parent ae85d92 commit aa81e07
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions _unittest/test_02_3D_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ def test_30_create_waveguide(self):
position, self.aedtapp.AXIS.Z, wgmodel="MYMODEL", wg_length=2000, parametrize_h=True
)
assert not wgfail
pass

def test_31_set_objects_unmodel(self):
assert self.aedtapp.modeler.set_object_model_state("Second_airbox", False)
Expand Down Expand Up @@ -663,7 +662,6 @@ def test_45_sweep_along_path(self):
def test_46_section_object(self):
box1 = self.aedtapp.modeler.create_box([-10, -10, -10], [20, 20, 20], "box_to_split")
assert self.aedtapp.modeler.section(box1, 0, create_new=True, section_cross_object=False)
pass

def test_47_sweep_along_vector(self):
sweep_vector = [5, 0, 0]
Expand Down
10 changes: 0 additions & 10 deletions _unittest/test_08_Primitives3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ def create_copper_box(self, name=None):
name = "MyBox"
if self.aedtapp.modeler[name]:
self.aedtapp.modeler.delete(name)
else:
pass
new_object = self.aedtapp.modeler.create_box([0, 0, 0], [10, 10, 5], name, "Copper")
return new_object

Expand Down Expand Up @@ -241,8 +239,6 @@ def test_03_create_polyhedron(self):
matname="Aluminum",
)

pass

def test_05_center_and_centroid(self):
o = self.create_copper_box()
tol = 1e-9
Expand Down Expand Up @@ -334,7 +330,6 @@ def test_15_create_cylinder(self):
assert o.is3d is True
assert not self.aedtapp.modeler.create_cylinder(axis, [2, 2], radius, height, 8, "MyCyl", "Copper")
assert not self.aedtapp.modeler.create_cylinder(axis, udp, -0.1, height, 8, "MyCyl", "Copper")
pass

def test_16_create_ellipse(self):
udp = self.aedtapp.modeler.Position(5, 3, 8)
Expand Down Expand Up @@ -378,7 +373,6 @@ def test_17_create_object_from_edge(self):
of = self.aedtapp.modeler.create_object_from_edge([o4.edges[0], o3.edges[1], o4.edges[1]])
assert of
assert len(of) == 3
pass

def test_18_create_object_from_face(self):
o = self.create_copper_cylinder()
Expand All @@ -400,7 +394,6 @@ def test_18_create_object_from_face(self):
of = self.aedtapp.modeler.create_object_from_face([o3.faces[0], o4.faces[1], o4.faces[1], o3.faces[2]])
assert of
assert len(of) == 4
pass

def test_19_create_polyline(self):
udp1 = [0, 0, 0]
Expand Down Expand Up @@ -868,8 +861,6 @@ def test_48_insert_polylines_segments_test2(self):

P.insert_segment(position_list=[start_point, insert_point1, insert_point2], segment="Arc")

pass

def test_49_modify_crossection(self):
P = self.aedtapp.modeler.create_polyline(
position_list=[[34.1004, 14.1248, 0], [27.646, 16.7984, 0], [24.9725, 10.3439, 0]],
Expand Down Expand Up @@ -1157,7 +1148,6 @@ def test_60_get_edges_on_bounding_box(self):
def test_61_get_closest_edge_to_position(self):
my_box = self.create_copper_box("test_closest_edge")
assert isinstance(self.aedtapp.modeler.get_closest_edgeid_to_position([0.2, 0, 0]), int)
pass

@pytest.mark.skipif(config["NonGraphical"], reason="Not running in non-graphical mode")
def test_62_import_space_claim(self):
Expand Down
1 change: 0 additions & 1 deletion _unittest/test_09_VariableManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def test_02_test_formula(self):
v = self.aedtapp.variable_manager
for var_name in v.variable_names:
print("{} = {}".format(var_name, self.aedtapp[var_name]))
pass
tol = 1e-9
c2pi = math.pi * 2.0
assert abs(v["$PrjVar1"].numeric_value - c2pi) < tol
Expand Down
2 changes: 0 additions & 2 deletions _unittest/test_12_1_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ def test_09n_add_line_from_point(self): # pragma: no cover
assert new_report.limit_lines[0].set_line_properties(
style=style.Dot, width=4, hatch_above=False, violation_emphasis=True, hatch_pixels=1, color=(255, 255, 0)
)
pass

@pytest.mark.skipif(
config["desktopVersion"] < "2022.2", reason="Not working in non-graphical mode in version earlier than 2022.2."
Expand All @@ -479,7 +478,6 @@ def test_09o_add_note(self): # pragma: no cover
font_size=10,
color=(255, 0, 0),
)
pass

def test_10_delete_report(self):
plots_number = len(self.aedtapp.post.plots)
Expand Down
1 change: 0 additions & 1 deletion _unittest/test_20_HFSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ def test_24_create_curvilinear(self):
).GetPropValue("Apply Curvilinear Elements")
mesh.delete()
assert len(self.aedtapp.mesh.meshoperations) == 2
pass

def test_30_assign_initial_mesh(self):
assert self.aedtapp.mesh.assign_initial_mesh_from_slider(6)
Expand Down
1 change: 0 additions & 1 deletion _unittest/test_21_Circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def test_06a_create_setup(self):
def test_08_import_mentor_netlist(self):
self.aedtapp.insert_design("MentorSchematicImport")
assert self.aedtapp.create_schematic_from_mentor_netlist(self.netlist_file2)
pass

def test_09_import_netlist(self):
self.aedtapp.insert_design("SchematicImport")
Expand Down
2 changes: 0 additions & 2 deletions _unittest/test_41_3dlayout_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ def test_33_set_temperature_dependence(self):
ambient_temp=27,
create_project_var=True,
)
pass

def test_34_create_additional_setup(self):
setup_name = "SiwaveDC"
Expand Down Expand Up @@ -651,7 +650,6 @@ def test_39_import_ipc(self):
def test_40_test_flex(self, add_app):
flex = add_app(project_name=test_rigid_flex, application=Hfss3dLayout, subfolder=test_subfolder)
assert flex.enable_rigid_flex()
pass

def test_41_test_create_polygon(self):
points = [[100, 100], [100, 200], [200, 200]]
Expand Down
1 change: 0 additions & 1 deletion _unittest/test_98_Icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def test_10_DesignSettings(self):

def test_11_mesh_level(self):
assert self.aedtapp.mesh.assign_mesh_level({"USB_Shiels": 2})
pass

def test_12a_AssignMeshOperation(self):
self.aedtapp.oproject = test_project_name
Expand Down
1 change: 0 additions & 1 deletion _unittest_solvers/test_31_Q3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def test_08_create_faceted_bondwire(self):
"bondwire_example", self.aedtapp.AXIS.Z, min_size=0.2, numberofsegments=8
)
assert test
pass

def test_11_assign_net(self):
box = self.aedtapp.modeler.create_box([30, 30, 30], [10, 10, 10], name="mybox")
Expand Down
2 changes: 0 additions & 2 deletions pyaedt/application/Variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ def __init__(
for quantity_name in self._header:
self._data[quantity_name] = []

pass

@pyaedt_function_handler()
def __getitem__(self, item):
variable_list = item.split(",")
Expand Down
4 changes: 0 additions & 4 deletions pyaedt/desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def _close_aedt_application(desktop_class, close_desktop, pid, is_grpc_api):
return True
except Exception: # pragma: no cover
warnings.warn("Something went wrong closing AEDT. Exception in `_main.oDesktop.QuitApplication()`.")
pass
elif _desktop_sessions and len(_desktop_sessions) > 1 and not desktop_class.parent_desktop_id:
pyaedt_logger.error("Release is not allowed when multiple desktop sessions are available.")
pyaedt_logger.error("Closing Desktop session.")
Expand All @@ -268,7 +267,6 @@ def _close_aedt_application(desktop_class, close_desktop, pid, is_grpc_api):
return True
except Exception: # pragma: no cover
warnings.warn("Something went wrong closing AEDT. Exception in `_main.oDesktop.QuitApplication()`.")
pass
elif _desktop_sessions and len(_desktop_sessions) > 1:
pyaedt_logger.error("A child desktop session is linked to this session.")
pyaedt_logger.error("Multiple desktop sessions must be released in reverse order.")
Expand All @@ -284,7 +282,6 @@ def _close_aedt_application(desktop_class, close_desktop, pid, is_grpc_api):
warnings.warn(
"Something went wrong releasing AEDT. Exception in `StandalonePyScriptWrapper.Release()`."
)
pass
elif not inside_desktop:
if close_desktop:
try:
Expand All @@ -302,7 +299,6 @@ def _close_aedt_application(desktop_class, close_desktop, pid, is_grpc_api):
pyaedt_logger.warning(
"Something went wrong releasing AEDT. Exception in `_main.COMUtil.ReleaseCOMObjectScope`."
)
pass
if not settings.remote_rpc_session and not is_ironpython and close_desktop:
timeout = 10
while pid in active_sessions():
Expand Down
1 change: 0 additions & 1 deletion pyaedt/generic/configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,6 @@ def _export_mesh_operations(self, dict_out):
}
dict_out["mesh"][mesh.name] = mop[mesh.name]
self._map_object(mop, dict_out)
pass

@pyaedt_function_handler()
def update_monitor(self, m_case, m_object, m_quantity, m_name):
Expand Down
1 change: 0 additions & 1 deletion pyaedt/modeler/circuits/PrimitivesCircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def __init__(self, modeler):
self.current_position = [0, 0]
self.increment_mils = [1000, 1000]
self.limits_mils = 20000
pass

@property
def o_definition_manager(self):
Expand Down
5 changes: 0 additions & 5 deletions pyaedt/modules/DesignXPloration.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,6 @@ def __init__(self, p_app, name, dictinputs=None, optim_type="OptiParametric"):
def delete(self):
"""Delete a defined Optimetrics Setup.
Parameters
----------
setup_name : str
Name of optimetrics setup to delete.
Returns
-------
bool
Expand Down
2 changes: 0 additions & 2 deletions pyaedt/modules/Material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,6 @@ def _update_material(self):
self._props[property] if property in self._props else MatProperties.get_defaultvalue(aedtname=property)
)
self.__dict__["_" + property] = MatProperty(self, property, property_value, tmods, smods)
pass

@property
def material_appearance(self):
Expand Down Expand Up @@ -2704,7 +2703,6 @@ def __init__(self, materiallib, name, props=None, material_update=True):
self.__dict__["_" + property] = MatProperty(
self, property, SurfMatProperties.get_defaultvalue(aedtname=property)
)
pass

@property
def emissivity(self):
Expand Down

0 comments on commit aa81e07

Please sign in to comment.