Skip to content

Follow python guidelines. #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyaedt/generic/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyaedt/generic/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pyaedt/icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion pyaedt/maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down
6 changes: 3 additions & 3 deletions pyaedt/modules/report_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down