Skip to content

Commit

Permalink
DOCS: Fix numpy docstyle warnings and errors. (#5586)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxJPRey authored Dec 17, 2024
1 parent c10d896 commit 84a7b79
Show file tree
Hide file tree
Showing 69 changed files with 32 additions and 958 deletions.
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def deprecation_warning():

# Define and use custom showwarning
def custom_show_warning(message, category, filename, lineno, file=None, line=None):
"""Custom warning used to remove <stdin>:loc: pattern."""
"""Define and use custom warning to remove <stdin>:loc: pattern."""
print(f"{category.__name__}: {message}")

warnings.showwarning = custom_show_warning
Expand Down
18 changes: 0 additions & 18 deletions src/ansys/aedt/core/application/aedt_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def oradfield(self):
References
----------
>>> oDesign.GetModule("RadField")
"""
if self.design_type == "HFSS" and self._odesign.GetSolutionType() not in ["EigenMode", "Characteristic Mode"]:
Expand All @@ -111,7 +110,6 @@ def o_symbol_manager(self):
References
----------
>>> oSymbolManager = oDefinitionManager.GetManager("Symbol")
"""
if self.odefinition_manager:
Expand All @@ -124,7 +122,6 @@ def opadstackmanager(self):
References
----------
>>> oPadstackManger = oDefinitionManager.GetManager("Padstack")
"""
if self._oproject and not self._opadstackmanager:
Expand Down Expand Up @@ -153,7 +150,6 @@ def oimport_export(self):
References
----------
>>> oDesktop.GetTool("ImportExport")
"""
if not self._oimport_export:
Expand All @@ -166,7 +162,6 @@ def ooptimetrics(self):
References
----------
>>> oDesign.GetModule("Optimetrics")
"""
if not self._ooptimetrics and self.design_type not in ["Circuit Netlist", "Maxwell Circuit", "EMIT"]:
Expand All @@ -179,7 +174,6 @@ def ooutput_variable(self):
References
----------
>>> oDesign.GetModule("OutputVariable")
"""
if not self._ooutput_variable and self.design_type not in ["EMIT", "Maxwell Circuit", "Circuit Netlist"]:
Expand All @@ -192,7 +186,6 @@ def oanalysis(self):
References
----------
>>> oDesign.GetModule("SolveSetups")
>>> oDesign.GetModule("SimSetup")
>>> oDesign.GetModule("AnalysisSetup")
Expand All @@ -215,7 +208,6 @@ def odefinition_manager(self):
References
----------
>>> oDefinitionManager = oProject.GetDefinitionManager()
"""
if not self._odefinition_manager and self._oproject:
Expand All @@ -228,7 +220,6 @@ def omaterial_manager(self):
References
----------
>>> oMaterialManager = oDefinitionManager.GetManager("Material")
"""
if self.odefinition_manager and not self._omaterial_manager:
Expand All @@ -241,7 +232,6 @@ def omodelsetup(self):
References
----------
>>> oDesign.GetModule("ModelSetup")
"""
if self.design_type not in ["Maxwell 3D", "Maxwell 2D", "HFSS"]:
Expand All @@ -261,7 +251,6 @@ def o_maxwell_parameters(self):
References
----------
>>> oDesign.GetModule("MaxwellParameterSetup")
"""
if self._odesign and self.design_type not in ["Maxwell 3D", "Maxwell 2D"]:
Expand All @@ -285,7 +274,6 @@ def osolution(self):
References
----------
>>> oModule = oDesign.GetModule("Solutions")
"""
if not self._osolution:
Expand All @@ -310,7 +298,6 @@ def oexcitation(self):
References
----------
>>> oModule = oDesign.GetModule("Excitations")
"""
if self.design_type not in ["HFSS3DLayout", "HFSS 3D Layout Design"]:
Expand Down Expand Up @@ -339,7 +326,6 @@ def ofieldsreporter(self):
References
----------
>>> oDesign.GetModule("FieldsReporter")
"""
if self.design_type in [
Expand All @@ -366,7 +352,6 @@ def oreportsetup(self):
References
----------
>>> oDesign.GetModule("ReportSetup")
"""
if not self._oreportsetup:
Expand All @@ -379,7 +364,6 @@ def omeshmodule(self):
References
----------
>>> oDesign.GetModule("MeshRegion")
"""
meshers = {
Expand All @@ -403,7 +387,6 @@ def oeditor(self):
References
----------
>>> oEditor = oDesign.SetActiveEditor("SchematicEditor")"""
if not self._oeditor and self._odesign:
if self.design_type in ["Circuit Design", "Twin Builder", "Maxwell Circuit", "EMIT"]:
Expand All @@ -427,7 +410,6 @@ def layouteditor(self):
References
----------
>>> oDesign.SetActiveEditor("Layout")
"""
if not self._layouteditor and self.design_type in ["Circuit Design"]:
Expand Down
27 changes: 0 additions & 27 deletions src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def output_variables(self):
References
----------
>>> oModule.GetOutputVariables()
"""
return self.ooutput_variable.GetOutputVariables()
Expand Down Expand Up @@ -312,7 +311,6 @@ def active_setup(self):
References
----------
>>> oModule.GetAllSolutionSetups()
"""
if self._setup:
Expand Down Expand Up @@ -345,7 +343,6 @@ def existing_analysis_sweeps(self):
References
----------
>>> oModule.GelAllSolutionNames
>>> oModule.GetSweeps
"""
Expand Down Expand Up @@ -386,7 +383,6 @@ def nominal_adaptive(self):
References
----------
>>> oModule.GelAllSolutionNames
>>> oModule.GetSweeps
"""
Expand Down Expand Up @@ -426,7 +422,6 @@ def existing_analysis_setups(self):
References
----------
>>> oModule.GetSetups
"""
setups = []
Expand All @@ -447,7 +442,6 @@ def setup_names(self):
References
----------
>>> oModule.GetSetups
"""
setup_names = []
Expand Down Expand Up @@ -489,7 +483,6 @@ def excitations(self):
References
----------
>>> oModule.GetExcitations
"""
try:
Expand Down Expand Up @@ -529,7 +522,6 @@ def excitation_objects(self):
References
----------
>>> oModule.GetExcitations
"""
exc_names = self.excitations[::]
Expand Down Expand Up @@ -676,7 +668,6 @@ def list_of_variations(self, setup=None, sweep=None):
References
----------
>>> oModule.ListVariations
"""

Expand Down Expand Up @@ -761,7 +752,6 @@ def export_results(
References
----------
>>> oModule.GetAllPortsList
>>> oDesign.ExportProfile
>>> oModule.ExportToFile
Expand Down Expand Up @@ -977,7 +967,6 @@ def export_convergence(self, setup, variations="", output_file=None):
References
----------
>>> oModule.ExportConvergence
"""
if " : " in setup:
Expand Down Expand Up @@ -1098,7 +1087,6 @@ def variations(self, setup_sweep=None, output_as_dict=False):
References
----------
>>> oModule.GetAvailableVariations
"""
variations_string = self.get_variation_strings(setup_sweep)
Expand Down Expand Up @@ -1150,7 +1138,6 @@ def get_variation_strings(self, setup_sweep=None):
References
----------
>>> oModule.GetAvailableVariations
"""
if not setup_sweep:
Expand All @@ -1177,7 +1164,6 @@ def nominal_w_values(self):
References
----------
>>> oDesign.GetChildObject('Variables').GetChildNames
>>> oDesign.GetVariables
>>> oDesign.GetVariableValue
Expand All @@ -1200,7 +1186,6 @@ def nominal_w_values_dict(self):
References
----------
>>> oDesign.GetChildObject('Variables').GetChildNames
>>> oDesign.GetVariables
>>> oDesign.GetVariableValue
Expand All @@ -1223,7 +1208,6 @@ def nominal_w_values_dict_w_dependent(self):
References
----------
>>> oDesign.GetChildObject('Variables').GetChildNames
>>> oDesign.GetVariables
>>> oDesign.GetVariableValue
Expand Down Expand Up @@ -1259,7 +1243,6 @@ def get_setups(self):
References
----------
>>> oModule.GetSetups
"""
setups = self.oanalysis.GetSetups()
Expand Down Expand Up @@ -1301,7 +1284,6 @@ def get_sweeps(self, name):
References
----------
>>> oModule.GetSweeps
"""
sweeps = self.oanalysis.GetSweeps(name)
Expand All @@ -1328,7 +1310,6 @@ def export_parametric_results(self, sweep, output_file, export_units=True):
References
----------
>>> oModule.ExportParametricResults
"""
self.ooptimetrics.ExportParametricResults(sweep, output_file, export_units)
Expand Down Expand Up @@ -1467,7 +1448,6 @@ def delete_setup(self, name):
References
----------
>>> oModule.DeleteSetups
Examples
Expand Down Expand Up @@ -1506,7 +1486,6 @@ def edit_setup(self, name, properties):
References
----------
>>> oModule.EditSetup
"""

Expand Down Expand Up @@ -1573,7 +1552,6 @@ def create_output_variable(self, variable, expression, solution=None, context=No
References
----------
>>> oModule.CreateOutputVariable
"""
if context is None:
Expand Down Expand Up @@ -1611,7 +1589,6 @@ def get_output_variable(self, variable, solution=None):
References
----------
>>> oDesign.GetNominalVariation
>>> oModule.GetOutputVariableValue
"""
Expand Down Expand Up @@ -1722,7 +1699,6 @@ def analyze(
References
----------
>>> oDesign.Analyze
"""
if solve_in_batch:
Expand Down Expand Up @@ -1795,7 +1771,6 @@ def analyze_setup(
References
----------
>>> oDesign.Analyze
"""
start = time.time()
Expand Down Expand Up @@ -2139,7 +2114,6 @@ def submit_job(
References
----------
>>> oDesktop.SubmitJob
"""
return self.desktop_class.submit_job(
Expand Down Expand Up @@ -2464,7 +2438,6 @@ def change_property(self, aedt_object, tab_name, property_object, property_name,
References
----------
>>> oEditor.ChangeProperty
"""
if isinstance(property_value, list) and len(property_value) == 3:
Expand Down
Loading

0 comments on commit 84a7b79

Please sign in to comment.