diff --git a/pyaedt/generic/plot.py b/pyaedt/generic/plot.py index 8e60c47ed5b..d9328a88958 100644 --- a/pyaedt/generic/plot.py +++ b/pyaedt/generic/plot.py @@ -1191,7 +1191,6 @@ def _read_mesh_files(self, read_frames=False): field.is_vector = False field.log = log1 else: - points = [] nodes = [] values = [] is_vector = False diff --git a/pyaedt/generic/toolkit.py b/pyaedt/generic/toolkit.py index 4705347371d..0d984890f80 100644 --- a/pyaedt/generic/toolkit.py +++ b/pyaedt/generic/toolkit.py @@ -121,7 +121,6 @@ from System.Windows.Media.Imaging import BitmapImage, BitmapCacheOption, BitmapCreateOptions from System import Uri, UriKind, Environment -from System.Windows.Media.Imaging import BitmapImage @pyaedt_function_handler() @@ -200,6 +199,7 @@ def copy_files_mkdir(root, files_in_subdir): Returns ------- bool + ``True`` when successful, ``False`` when failed. """ if not os.path.exists(root): os.mkdir(root) diff --git a/pyaedt/icepak.py b/pyaedt/icepak.py index 5e4cfd05563..ad79e99ecf0 100644 --- a/pyaedt/icepak.py +++ b/pyaedt/icepak.py @@ -1489,9 +1489,9 @@ def assign_em_losses( >>> oModule.AssignEMLoss """ - if surface_objects == None: + if surface_objects is None: surface_objects = [] - if object_list == None: + if object_list is None: object_list = [] self.logger.info("Mapping HFSS EM losses.") diff --git a/pyaedt/maxwell.py b/pyaedt/maxwell.py index 4af9e9c874a..92e50ed2ab7 100644 --- a/pyaedt/maxwell.py +++ b/pyaedt/maxwell.py @@ -239,7 +239,7 @@ def assign_matrix( self.logger.info("Infinite is the only return path option in EddyCurrent") return_path = ["infinite"] * len(sources) - if not self.solution_type in ["Transient", "ElectricTransient"]: + if self.solution_type not in ["Transient", "ElectricTransient"]: if not matrix_name: matrix_name = generate_unique_name("Matrix") if not turns or len(sources) != len(self.modeler.convert_to_selections(turns, True)): diff --git a/pyaedt/modules/report_templates.py b/pyaedt/modules/report_templates.py index 58cb160320a..032c0190b59 100644 --- a/pyaedt/modules/report_templates.py +++ b/pyaedt/modules/report_templates.py @@ -1998,11 +1998,11 @@ def __init__(self, app, report_type, setup_name): self.domain = "Sweep" self.primary_sweep = "Phi" self.secondary_sweep = "Theta" - if not "Phi" in self.variations: + if "Phi" not in self.variations: self.variations["Phi"] = ["All"] - if not "Theta" in self.variations: + if "Theta" not in self.variations: self.variations["Theta"] = ["All"] - if not "Freq" in self.variations: + if "Freq" not in self.variations: self.variations["Freq"] = ["Nominal"] @property